From: Harvie Date: Sat, 10 Jul 2010 06:30:32 +0000 (+0200) Subject: fixed passing forgotten parameter to render_dir_line() X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=4e7a2682c1c29070260c170ee558bb1ed2216ac5;p=mirrors%2FJukeBox.git fixed passing forgotten parameter to render_dir_line() --- diff --git a/index.php b/index.php index 233513e..a815230 100755 --- a/index.php +++ b/index.php @@ -205,8 +205,8 @@ function render_file_line($dir, $item, $dir_url, $index, $filesize, $parent = fa echo(' '.unxss(str_replace('_', ' ', $item)).''.$filesize." MiB \n"); } -function render_dir_line($item, $i) { - $parclass=($i%2?'even':'odd'); $parcolor=($index%2?'lightblue':'white'); +function render_dir_line($current_dir, $item, $i) { + $parclass=($i%2?'even':'odd'); $parcolor=($i%2?'lightblue':'white'); $temp=str_replace('%2F', '/', rawurlencode($current_dir)).rawurlencode($item); echo("". ''.$i.'P/'. @@ -477,7 +477,7 @@ for($s=2;$s;$s--) { while(($item = readdir($dd)) != false) { render_file_line($dir, $item, $music_dir_url, $i, filesize($dir.$item)); } if(is_dir($dir.$item)) { - render_dir_line($item, $i); + render_dir_line($current_dir, $item, $i); } } } rewinddir($dd); } @@ -487,7 +487,7 @@ if($sort > 1) { @sort($itemsd); foreach($itemsd as $item) { $i++; - render_dir_line($item, $i); + render_dir_line($current_dir, $item, $i); } foreach($itemsf as $item) { $i++;