diff options
author | Gerrit Uitslag <klapinklapin@gmail.com> | 2013-11-20 13:47:13 +0100 |
---|---|---|
committer | Gerrit Uitslag <klapinklapin@gmail.com> | 2013-11-20 13:47:13 +0100 |
commit | ee33e0c5628d9cab52676a5aa2f55356c563c209 (patch) | |
tree | a45831b9c2151c47c7f0feef55e2943e1424b4fc /inc | |
parent | f523c9718baf12a5bc99e2285bc0666796ab2a97 (diff) | |
download | rpg-ee33e0c5628d9cab52676a5aa2f55356c563c209.tar.gz rpg-ee33e0c5628d9cab52676a5aa2f55356c563c209.tar.bz2 |
isCurrentPage is page dependent
Diffstat (limited to 'inc')
-rw-r--r-- | inc/changelog.php | 9 | ||||
-rw-r--r-- | inc/html.php | 2 |
2 files changed, 3 insertions, 8 deletions
diff --git a/inc/changelog.php b/inc/changelog.php index 36be9dc79..de26fdf6a 100644 --- a/inc/changelog.php +++ b/inc/changelog.php @@ -560,16 +560,11 @@ class PageRevisionLog { * otherwise false */ public function getRelativeRevision($rev, $direction, $media = false) { - global $INFO; - $rev = max($rev, 0); $direction = (int) $direction; //no direction given or last rev, so no follow-up - if(!$direction || - ($direction > 0 - && isset($INFO['meta']['last_change']['date']) - && $rev == $INFO['meta']['last_change']['date'])) { + if(!$direction || ($direction > 0 && $this->isCurrentRevision($rev)) ) { return false; } @@ -768,7 +763,7 @@ class PageRevisionLog { * @param int $rev timestamp of current page * @return bool true if $rev is current revision, otherwise false */ - static public function isCurrentRevision($rev){ + public function isCurrentRevision($rev){ return isset($INFO['meta']['last_change']) && $rev == $INFO['meta']['last_change']['date']; } } diff --git a/inc/html.php b/inc/html.php index e1c69a043..b48a17fc5 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1222,7 +1222,7 @@ function html_diff($text='',$intro=true,$type=null){ )); ptln('<a class="wikilink1" href="'.$recenturl.'">'.$lang['overviewrevs'].'</a>'); if($next_rev){ - if(PageRevisionLog::isCurrentRevision($next_rev)) { + if($pagelog->isCurrentRevision($next_rev)) { $diffurlnextparam = array( 'do' => 'diff', 'rev' => $r_rev, |