Commit c9a80160 authored by Alexandre Bailly's avatar Alexandre Bailly

Revert helpers.php

parent 2cb7d38d
Pipeline #6284 passed with stage
in 20 seconds
......@@ -32,10 +32,8 @@ function filenameToIdentifier($filename) {
global $USE_FILENAME_AS_IDENTIFIER;
global $USE_UID_AS_IDENTIFIER;
if ($USE_FILENAME_AS_IDENTIFIER)
if ($USE_FILENAME_AS_IDENTIFIER || $USE_UID_AS_IDENTIFIER)
return rawurlencode($filename);
if ($USE_UID_AS_IDENTIFIER)
return getUidFromTitle($filename);
$parts = explode('-', $filename);
......@@ -155,18 +153,4 @@ function getTitleInfoFromUid($ident) {
return false;
}
function getUidFromTitle($title)
{
/// try to find the filename in names.php
global $names;
foreach ($names as $S => $video_array) {
foreach ($video_array as $V => $data) {
if ($data['file'] === $title) {
return $data['uid'];
}
}
}
return $false;
}
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment