This commit is contained in:
Nicolas A. Tonne
2014-10-23 20:50:10 +02:00
parent 8cf382f71a
commit ffac0cb20c

View File

@@ -20,12 +20,12 @@ $np = array_values($np);
$firstSong = array_values($songs); $firstSong = array_values($songs);
$save = false; //declares the save variable, see further down for why $save = false; //declares the save variable, see further down for why
try{ if(is_array($data["conf"]["views"])){
if(!in_array($guid, $data["conf"]["views"])){ //add viewer in viewers if not already in there if(!in_array($guid, $data["conf"]["views"])){ //add viewer in viewers if not already in there
array_push($data["conf"]["views"], $guid); array_push($data["conf"]["views"], $guid);
file_put_contents($list, json_encode($data)); file_put_contents($list, json_encode($data));
} }
}catch(Exception $e){ }else{
$data["conf"]["views"]=array($guid); $data["conf"]["views"]=array($guid);
file_put_contents($list, json_encode($data)); file_put_contents($list, json_encode($data));
} }