summaryrefslogtreecommitdiff
path: root/inc/changelog.php
diff options
context:
space:
mode:
authorGerrit Uitslag <klapinklapin@gmail.com>2013-11-21 18:02:12 +0100
committerGerrit Uitslag <klapinklapin@gmail.com>2013-11-21 18:02:12 +0100
commit0f13c836f0ee71a3188a775b9ea64025e10d38f5 (patch)
tree3da2a0fc5519a6921a805b97c4b3ee30ed5c0908 /inc/changelog.php
parentee33e0c5628d9cab52676a5aa2f55356c563c209 (diff)
downloadrpg-0f13c836f0ee71a3188a775b9ea64025e10d38f5.tar.gz
rpg-0f13c836f0ee71a3188a775b9ea64025e10d38f5.tar.bz2
Improved isCurrentRevision(), tests included
Diffstat (limited to 'inc/changelog.php')
-rw-r--r--inc/changelog.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/inc/changelog.php b/inc/changelog.php
index de26fdf6a..722365853 100644
--- a/inc/changelog.php
+++ b/inc/changelog.php
@@ -760,11 +760,12 @@ class PageRevisionLog {
/**
* Check whether given revision is the current page
*
- * @param int $rev timestamp of current page
+ * @param int $rev timestamp of current page
+ * @param bool $media look for media?
* @return bool true if $rev is current revision, otherwise false
*/
- public function isCurrentRevision($rev){
- return isset($INFO['meta']['last_change']) && $rev == $INFO['meta']['last_change']['date'];
+ public function isCurrentRevision($rev, $media = false) {
+ return $rev == @filemtime($media ? mediaFN($this->id) : wikiFN($this->id));
}
}