summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2014-02-23 09:54:47 +0100
committerAndreas Gohr <andi@splitbrain.org>2014-02-23 09:54:47 +0100
commit01c9a118dacc1e2c07f2b0ddee84c514022e5927 (patch)
tree482cd3760819b6b31aa3f3f142ccf13314e801af
parentadfe6dafd15d9bf52ed6212b44b02a6a32c8bf49 (diff)
downloadrpg-01c9a118dacc1e2c07f2b0ddee84c514022e5927.tar.gz
rpg-01c9a118dacc1e2c07f2b0ddee84c514022e5927.tar.bz2
have most current revision always available in $INFO
fixes fix for FS#2853
-rw-r--r--inc/common.php9
-rw-r--r--inc/html.php2
2 files changed, 6 insertions, 5 deletions
diff --git a/inc/common.php b/inc/common.php
index 32771285b..bbc0a6e68 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -155,12 +155,13 @@ function pageinfo() {
$info['subscribed'] = false;
}
- $info['locked'] = checklock($ID);
- $info['filepath'] = fullpath(wikiFN($ID));
- $info['exists'] = @file_exists($info['filepath']);
+ $info['locked'] = checklock($ID);
+ $info['filepath'] = fullpath(wikiFN($ID));
+ $info['exists'] = @file_exists($info['filepath']);
+ $info['currentrev'] = @filemtime($info['filepath']);
if($REV) {
//check if current revision was meant
- if($info['exists'] && (@filemtime($info['filepath']) == $REV)) {
+ if($info['exists'] && ($info['currentrev'] == $REV)) {
$REV = '';
} elseif($RANGE) {
//section editing does not work with old revisions!
diff --git a/inc/html.php b/inc/html.php
index 0434f3b45..fcec29670 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -1189,7 +1189,7 @@ function html_diff($text='',$intro=true,$type=null){
$diffurl = wl($ID, array(
'do' => 'diff',
'rev2[0]' => $l_rev,
- 'rev2[1]' => $r_rev ? $r_rev : $INFO['lastmod'], // link to exactly this view FS#2835
+ 'rev2[1]' => $r_rev ? $r_rev : $INFO['currentrev'], // link to exactly this view FS#2835
'difftype' => $type,
));
ptln('<p><a class="wikilink1" href="'.$diffurl.'">'.$lang['difflink'].'</a></p>');