Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/scan.php =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/scan.php,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/scan.php 25 Feb 2007 19:06:27 -0000 1.3 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/scan.php 24 Nov 2007 15:35:43 -0000 1.4 @@ -1,106 +1,106 @@ - - [ ]; - $url, 'children'=>$subdir); - } - } - elseif(is_file($path)) - { - if(($include && !preg_match($include, $url)) || ($exclude && preg_match($exclude, $url))) continue; - $files[] = array('url'=>$url); - } - - } - } - @closedir($dh); - return dirsort($files); - } - - function dirsort($files) - { - usort($files, 'dircomp'); - return $files; - } - - function dircomp($a, $b) - { - if(is_array($a)) $a = array_shift($a); - if(is_array($b)) $b = array_shift($b); - return strcmp(strtolower($a), strtolower($b)); - } - - echo xinha_to_js(scan($dir)); -?> + + [ ]; + $url, 'children'=>$subdir); + } + } + elseif(is_file($path)) + { + if(($include && !preg_match($include, $url)) || ($exclude && preg_match($exclude, $url))) continue; + $files[] = array('url'=>$url); + } + + } + } + @closedir($dh); + return dirsort($files); + } + + function dirsort($files) + { + usort($files, 'dircomp'); + return $files; + } + + function dircomp($a, $b) + { + if(is_array($a)) $a = array_shift($a); + if(is_array($b)) $b = array_shift($b); + return strcmp(strtolower($a), strtolower($b)); + } + + echo xinha_to_js(scan($dir)); +?>