summaryrefslogtreecommitdiff
path: root/inc/changelog.php
diff options
context:
space:
mode:
authorGerrit Uitslag <klapinklapin@gmail.com>2013-11-20 13:47:13 +0100
committerGerrit Uitslag <klapinklapin@gmail.com>2013-11-20 13:47:13 +0100
commitee33e0c5628d9cab52676a5aa2f55356c563c209 (patch)
treea45831b9c2151c47c7f0feef55e2943e1424b4fc /inc/changelog.php
parentf523c9718baf12a5bc99e2285bc0666796ab2a97 (diff)
downloadrpg-ee33e0c5628d9cab52676a5aa2f55356c563c209.tar.gz
rpg-ee33e0c5628d9cab52676a5aa2f55356c563c209.tar.bz2
isCurrentPage is page dependent
Diffstat (limited to 'inc/changelog.php')
-rw-r--r--inc/changelog.php9
1 files changed, 2 insertions, 7 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'];
}
}