slitaz-forge diff mirror/root/dir-generator.php @ rev 288

tank: Changed path for graph images.
author Christopher Rogers <slaxemulator@gmail.com>
date Tue Apr 17 21:17:12 2012 +0000 (2012-04-17)
parents e1f7dc7926ee
children 17fc1a40d7da
line diff
     1.1 --- a/mirror/root/dir-generator.php	Sat Apr 14 15:30:37 2012 +0200
     1.2 +++ b/mirror/root/dir-generator.php	Tue Apr 17 21:17:12 2012 +0000
     1.3 @@ -328,12 +328,6 @@
     1.4  		if ($item == ".folderlist") continue;
     1.5  		if ($item == ".filelist") continue;
     1.6  		if ($item == "dir-generator.php") continue;
     1.7 -		if (isset($_GET['f'])) {
     1.8 -			$filter = $_GET['f'];
     1.9 -			if (substr($filter,0,1) != '/')
    1.10 -				$filter = '/'.$filter.'/i';
    1.11 -			if (!preg_match($filter,$item)) continue;
    1.12 -		}
    1.13  		if(is_dir($path.'/'.$item) and $item != '.' and $item != '..') {
    1.14  			$folderlist[] = array(
    1.15  				'name' => $item, 
    1.16 @@ -364,6 +358,17 @@
    1.17  }
    1.18  }
    1.19  
    1.20 +if (isset($_GET['f'])) {
    1.21 +	$filter = $_GET['f'];
    1.22 +	if (substr($filter,0,1) != '/')
    1.23 +		$filter = '/'.$filter.'/i';
    1.24 +	foreach ($filelist as $key => $value)
    1.25 +		if (!preg_match($filter,$value['name']))
    1.26 +			unset($filelist[$key]);
    1.27 +	foreach ($folderlist as $key => $value)
    1.28 +		if (!preg_match($filter,$value['name']))
    1.29 +			unset($folderlist[$key]);
    1.30 +}
    1.31  
    1.32  if(!isset($_GET['s'])) {
    1.33  	$_GET['s'] = 'name';