From fd5f1b00a1da224b4ec7a229dfc9b527b97e8126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Sun, 15 Feb 2015 14:26:12 +0100 Subject: [PATCH] Fixed bug with limiting lists on frontpage --- php/nochan.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/php/nochan.php b/php/nochan.php index 26cfd922..894174f3 100755 --- a/php/nochan.php +++ b/php/nochan.php @@ -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; - } }