Mercurial > dirlist-php
comparison index.php @ 20:caf498a0c602
Hide [root] for aliased directory.
| author | edogawaconan <me@myconan.net> | 
|---|---|
| date | Wed, 22 Oct 2014 11:58:24 +0900 | 
| parents | c5b8d2592585 | 
| children | fb351f473fd5 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 19:c5b8d2592585 | 20:caf498a0c602 | 
|---|---|
| 68 | 68 | 
| 69 $path_array = explode("/", trim($path, "/")); | 69 $path_array = explode("/", trim($path, "/")); | 
| 70 array_unshift($path_array, trim($prefix, "/")); | 70 array_unshift($path_array, trim($prefix, "/")); | 
| 71 | 71 | 
| 72 $tree_path = "/"; | 72 $tree_path = "/"; | 
| 73 $tree_link = link_to($tree_path, "[root]") . "/"; | 73 if ($prefix === "") { $tree_link = link_to($tree_path, "[root]"); } | 
| 74 $tree_link .= "/"; | |
| 74 | 75 | 
| 75 foreach ($path_array as $p) { | 76 foreach ($path_array as $p) { | 
| 76 if ($p === "") { continue; } | 77 if ($p === "") { continue; } | 
| 77 $tree_path .= $p . "/"; | 78 $tree_path .= $p . "/"; | 
| 78 $tree_link .= link_to($tree_path, $p) . "/"; | 79 $tree_link .= link_to($tree_path, $p) . "/"; | 
