summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Coburn <btcoburn@silicodon.net>2006-10-31 23:41:58 +0100
committerBen Coburn <btcoburn@silicodon.net>2006-10-31 23:41:58 +0100
commit2ca9d91c1c4b1048c7be938a1436def5521a1909 (patch)
tree71416ad5f23ff1c87a1835b52eb57431f27720e4
parente8b3027e5aab23e5e0eb36c6ac92d806b6fd49d4 (diff)
downloadrpg-2ca9d91c1c4b1048c7be938a1436def5521a1909.tar.gz
rpg-2ca9d91c1c4b1048c7be938a1436def5521a1909.tar.bz2
$REV checking now works correctly with synced attic
darcs-hash:20061031224158-05dcb-0bf9505f51be5ab91f258254adfdded5f7087dcf.gz
-rw-r--r--inc/common.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/inc/common.php b/inc/common.php
index 797ff0525..af1d2248b 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -89,15 +89,16 @@ function pageinfo(){
$info['namespace'] = getNS($ID);
$info['locked'] = checklock($ID);
- $info['filepath'] = realpath(wikiFN($ID,$REV));
+ $info['filepath'] = realpath(wikiFN($ID));
$info['exists'] = @file_exists($info['filepath']);
- if($REV && !$info['exists']){
+ if($REV){
//check if current revision was meant
- $cur = wikiFN($ID);
- if(@file_exists($cur) && (@filemtime($cur) == $REV)){
- $info['filepath'] = realpath($cur);
- $info['exists'] = true;
+ if($info['exists'] && (@filemtime($info['filepath'])==$REV)){
$REV = '';
+ }else{
+ //really use old revision
+ $info['filepath'] = realpath(wikiFN($ID,$REV));
+ $info['exists'] = @file_exists($info['filepath']);
}
}
$info['rev'] = $REV;