mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-28 14:04:45 -04:00
More PHP refactorings. Fixes text preview.
This commit is contained in:
parent
838a346c29
commit
029872a212
8 changed files with 141 additions and 134 deletions
|
@ -71,7 +71,7 @@ class Archive {
|
|||
|
||||
foreach ($hrefs as $href) {
|
||||
|
||||
$d = H5ai::normalize_path(dirname($href), true);
|
||||
$d = normalize_path(dirname($href), true);
|
||||
$n = basename($href);
|
||||
|
||||
$code = $this->h5ai->getHttpCode($d);
|
||||
|
@ -82,7 +82,7 @@ class Archive {
|
|||
if ($code == "h5ai" && !$this->h5ai->is_ignored($n)) {
|
||||
|
||||
$realFile = $this->h5ai->getAbsPath($href);
|
||||
$archivedFile = preg_replace("!^" . H5ai::normalize_path($this->h5ai->getRootAbsPath(), true) . "!", "", $realFile);
|
||||
$archivedFile = preg_replace("!^" . normalize_path($this->h5ai->getRootAbsPath(), true) . "!", "", $realFile);
|
||||
|
||||
if (is_dir($realFile)) {
|
||||
$this->add_dir($realFile, $archivedFile);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue