From fad2cd96dac4626174e2cf1b033574b8271fce42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Fri, 13 Feb 2015 00:54:05 +0100 Subject: [PATCH] Fixed so datalist still contains all channels --- php/nochan.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/php/nochan.php b/php/nochan.php index 04fe38c1..18ae2fe2 100755 --- a/php/nochan.php +++ b/php/nochan.php @@ -31,17 +31,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"){ //If it is true, the channelname will be shown on the frontpage + if(!array_key_exists("frontpage", $data['conf']) || $data['conf']['frontpage'] == "true" && $i <= 16){ //If it is true, the channelname will be shown on the frontpage array_push($channels, ucfirst(str_replace(".json", "", $files))); } } $i++; array_push($all_channels, ucfirst(str_replace(".json", "", $files))); - if($i > 16) - { - $tooMany = true; - break; - } + } } @@ -74,7 +70,7 @@ foreach($fil as $files){
Active Channels
- ".htmlspecialchars($channel)."";} if($tooMany) echo "..."; ?> + ".htmlspecialchars($channel)."";} ?>