Semantics.

This commit is contained in:
Lars Jung 2014-05-30 22:55:31 +02:00
parent 0d6410de8e
commit 25d84fe3df
6 changed files with 31 additions and 31 deletions

View file

@ -45,13 +45,13 @@ class App {
}
}
return normalize_path(ROOT_URL . implode("/", $encoded_parts), $trailing_slash);
return normalize_path(ROOT_HREF . implode("/", $encoded_parts), $trailing_slash);
}
public function to_path($url) {
$rel_url = substr($url, strlen(ROOT_URL));
$rel_url = substr($url, strlen(ROOT_HREF));
return normalize_path(ROOT_PATH . "/" . rawurldecode($rel_url));
}
@ -174,7 +174,7 @@ class App {
if ($folder->get_parent($cache)) {
$html .= "<tr>";
$html .= "<td class='fb-i'><img src='" . APP_URL . "client/images/fallback/parent.png' alt='folder-parent'/></td>";
$html .= "<td class='fb-i'><img src='" . APP_HREF . "client/images/fallback/parent.png' alt='folder-parent'/></td>";
$html .= "<td class='fb-n'><a href='..'>Parent Directory</a></td>";
$html .= "<td class='fb-d'></td>";
$html .= "<td class='fb-s'></td>";
@ -185,7 +185,7 @@ class App {
$type = $item->is_folder ? "folder" : "file";
$html .= "<tr>";
$html .= "<td class='fb-i'><img src='" . APP_URL . "client/images/fallback/" . $type . ".png' alt='" . $type . "'/></td>";
$html .= "<td class='fb-i'><img src='" . APP_HREF . "client/images/fallback/" . $type . ".png' alt='" . $type . "'/></td>";
$html .= "<td class='fb-n'><a href='" . $item->url . "'>" . basename($item->path) . "</a></td>";
$html .= "<td class='fb-d'>" . date("Y-m-d H:i", $item->date) . "</td>";
$html .= "<td class='fb-s'>" . ($item->size !== null ? intval($item->size / 1000) . " KB" : "" ) . "</td>";