Added support for hiding or showing channel on frontpage in settings

This commit is contained in:
Kasper Rynning-Tønnesen
2015-01-12 21:15:18 +01:00
parent 5a415b09a9
commit a7e563679b
15 changed files with 6 additions and 1 deletions

View File

@@ -23,7 +23,12 @@ foreach($dir as $files){
}
}
if($time_lasted < $time){
array_push($channels, ucfirst(str_replace(".json", "", $files)));
$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
array_push($channels, ucfirst(str_replace(".json", "", $files)));
}
}
array_push($all_channels, ucfirst(str_replace(".json", "", $files)));
}