Added support for those with no config

This commit is contained in:
Kasper Rynning-Tønnesen
2015-01-12 21:26:30 +01:00
parent 119cd02c57
commit 04dc0c9204

View File

@@ -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)));
}
}