mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed bug with limiting lists on frontpage
This commit is contained in:
@@ -33,16 +33,13 @@ foreach($fil as $files){
|
||||
if($time_lasted < $time){
|
||||
$file = file_get_contents($files); //Checking if the channel has the setting for showing on the frontpage set to true.
|
||||
$data = json_decode($file, TRUE);
|
||||
if(!array_key_exists("frontpage", $data['conf']) || $data['conf']['frontpage'] == "true" && $i <= 8){ //If it is true, the channelname will be shown on the frontpage
|
||||
if($i <= 12 && (!array_key_exists("frontpage", $data['conf']) || $data['conf']['frontpage'] == "true")){ //If it is true, the channelname will be shown on the frontpage
|
||||
array_push($channels, ucfirst(str_replace(".json", "", $files)));
|
||||
array_push($viewers, sizeof($data["conf"]["views"]));
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
array_push($all_channels, ucfirst(str_replace(".json", "", $files)));
|
||||
if($i >= 15)
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user