Merge pull request #86 from nixolas1/frontpagechannels

Added support for those with no config
This commit is contained in:
KasperRT
2015-01-12 21:27:12 +01:00

View File

@@ -25,8 +25,7 @@ foreach($dir as $files){
if($time_lasted < $time){ 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. $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); $data = json_decode($file, TRUE);
$conf = $data['conf']['frontpage']; if(!array_key_exists("frontpage", $data['conf']) || $data['conf']['frontpage'] == "true"){ //If it is true, the channelname will be shown on the frontpage
if($conf == "true"){ //If it is true, the channelname will be shown on the frontpage
array_push($channels, ucfirst(str_replace(".json", "", $files))); array_push($channels, ucfirst(str_replace(".json", "", $files)));
} }
} }