From 04dc0c9204c866a11bbf209c1817eb17c32f697e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Mon, 12 Jan 2015 21:26:30 +0100 Subject: [PATCH] Added support for those with no config --- php/nochan.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/php/nochan.php b/php/nochan.php index 5bedfc82..ab8eee00 100755 --- a/php/nochan.php +++ b/php/nochan.php @@ -25,8 +25,7 @@ foreach($dir as $files){ if($time_lasted < $time){ $file = file_get_contents('./lists/'.$files); //Checking if the channel has the setting for showing on the frontpage set to true. $data = json_decode($file, TRUE); - $conf = $data['conf']['frontpage']; - if($conf == "true"){ //If it is true, the channelname will be shown on the frontpage + if(!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))); } }