summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/changelog.php9
-rw-r--r--inc/html.php2
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,