tazwok diff web/index.php @ rev 407
Improve chroot configuration
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Fri Mar 04 06:23:07 2011 +0100 (2011-03-04) |
parents | 10cdaa252324 |
children | eb6a2f0a9faa |
line diff
1.1 --- a/web/index.php Mon Feb 28 16:53:48 2011 +0100 1.2 +++ b/web/index.php Fri Mar 04 06:23:07 2011 +0100 1.3 @@ -12,15 +12,15 @@ 1.4 function include_and_link($file) 1.5 { 1.6 global $log_dir, $version; 1.7 - if (($fp = fopen($file,"r")) === false) return; 1.8 - while (($pkg = fgets($fp)) !== false) { 1.9 - $pkg = chop($pkg); 1.10 + if (($str = file_get_contents($file)) === FALSE) return; 1.11 + $lines = explode("\n",$str); 1.12 + sort($lines); 1.13 + foreach ($lines as $pkg) { 1.14 if (file_exists("$log_dir/$pkg.html")) 1.15 echo "<a href=\"log.php?version=$version&package=". 1.16 urlencode($pkg)."\" target=\"_blank\">$pkg</a>\n"; 1.17 else echo "$pkg\n"; 1.18 } 1.19 - fclose($fp); 1.20 } 1.21 1.22 function list_last_cooked($dir, $suffix)