From 948bfbe21104d483fa3bc75d8fe4e7cc08e66149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Thu, 12 Feb 2015 15:18:06 +0100 Subject: [PATCH] temp limit on number of channels --- php/nochan.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/php/nochan.php b/php/nochan.php index 97a39222..8ad43b9d 100755 --- a/php/nochan.php +++ b/php/nochan.php @@ -10,6 +10,7 @@ $channels = array(); $all_channels = array(); $time = 60*60*24*4; //4 dager $to = 60*60*24*2; +$i = 0; foreach($dir as $files){ if(strpos($files, '.json') !== FALSE){ $time_lasted = time() - filemtime('./lists/'.$files); @@ -28,7 +29,10 @@ foreach($dir as $files){ array_push($channels, ucfirst(str_replace(".json", "", $files))); } } + $i++; array_push($all_channels, ucfirst(str_replace(".json", "", $files))); + if($i > 13) + break; } }