Commit 00037181 authored by Alexandre Bailly's avatar Alexandre Bailly

Fix r18

Oubli de l'évaluation du paramètre r18 dans index (la page d'accueil).
À cause de cet oubli, on peut tomber sur une vidéo 18+ alors que le paramètre r18 n'est pas présent dans l'URL.
Ref #23
parent b2aa9e51
Pipeline #7095 passed with stage
in 21 seconds
......@@ -28,6 +28,18 @@
die();
}
} else { // Otherwise pick a random video
// Remove 18+ if they weren't requested.
if (!isset($_GET['r18'])) {
foreach ($names as $series => $video_array) {
foreach ($video_array as $title => $data)
if (isset($data['r18']) && $data['r18'])
unset($names[$series][$title]);
if (!$names[$series])
unset($names[$series]);
}
}
$series = array_rand($names);
$title = array_rand($names[$series]);
$video = $names[$series][$title];
......
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