Skip to content

Commit

Permalink
Merge pull request #1507 from ssahara/pageinfo
Browse files Browse the repository at this point in the history
remove fullpath() call in pageinfo
  • Loading branch information
splitbrain committed Feb 3, 2017
2 parents 82be966 + c83f69b commit 2d90435
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions inc/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ function pageinfo() {
}

$info['locked'] = checklock($ID);
$info['filepath'] = fullpath(wikiFN($ID));
$info['filepath'] = wikiFN($ID);
$info['exists'] = file_exists($info['filepath']);
$info['currentrev'] = @filemtime($info['filepath']);
if($REV) {
Expand All @@ -227,7 +227,7 @@ function pageinfo() {
msg($lang['nosecedit'], 0);
} else {
//really use old revision
$info['filepath'] = fullpath(wikiFN($ID, $REV));
$info['filepath'] = wikiFN($ID, $REV);
$info['exists'] = file_exists($info['filepath']);
}
}
Expand Down
4 changes: 2 additions & 2 deletions inc/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -1010,9 +1010,9 @@ function tpl_pageinfo($ret = false) {
$fn = $INFO['filepath'];
if(!$conf['fullpath']) {
if($INFO['rev']) {
$fn = str_replace(fullpath($conf['olddir']).'/', '', $fn);
$fn = str_replace($conf['olddir'].'/', '', $fn);
} else {
$fn = str_replace(fullpath($conf['datadir']).'/', '', $fn);
$fn = str_replace($conf['datadir'].'/', '', $fn);
}
}
$fn = utf8_decodeFN($fn);
Expand Down

0 comments on commit 2d90435

Please sign in to comment.