Skip to content
Snippets Groups Projects
Commit 7b3a6803 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

Avoid editing sections of outdated pages FS#1513

darcs-hash:20081016181955-7ad00-5745635416542fd04dbdf67cbf043bf446e995bc.gz
parent f948eeab
No related branches found
No related tags found
No related merge requests found
...@@ -99,8 +99,10 @@ function formSecurityToken($print=true){ ...@@ -99,8 +99,10 @@ function formSecurityToken($print=true){
function pageinfo(){ function pageinfo(){
global $ID; global $ID;
global $REV; global $REV;
global $RANGE;
global $USERINFO; global $USERINFO;
global $conf; global $conf;
global $lang;
// include ID & REV not redundant, as some parts of DokuWiki may temporarily change $ID, e.g. p_wiki_xhtml // include ID & REV not redundant, as some parts of DokuWiki may temporarily change $ID, e.g. p_wiki_xhtml
// FIXME ... perhaps it would be better to ensure the temporary changes weren't necessary // FIXME ... perhaps it would be better to ensure the temporary changes weren't necessary
...@@ -143,6 +145,11 @@ function pageinfo(){ ...@@ -143,6 +145,11 @@ function pageinfo(){
//check if current revision was meant //check if current revision was meant
if($info['exists'] && (@filemtime($info['filepath'])==$REV)){ if($info['exists'] && (@filemtime($info['filepath'])==$REV)){
$REV = ''; $REV = '';
}elseif($RANGE){
//section editing does not work with old revisions!
$REV = '';
$RANGE = '';
msg($lang['nosecedit'],0);
}else{ }else{
//really use old revision //really use old revision
$info['filepath'] = fullpath(wikiFN($ID,$REV)); $info['filepath'] = fullpath(wikiFN($ID,$REV));
......
...@@ -64,6 +64,7 @@ $lang['profile'] = 'User Profile'; ...@@ -64,6 +64,7 @@ $lang['profile'] = 'User Profile';
$lang['badlogin'] = 'Sorry, username or password was wrong.'; $lang['badlogin'] = 'Sorry, username or password was wrong.';
$lang['minoredit'] = 'Minor Changes'; $lang['minoredit'] = 'Minor Changes';
$lang['draftdate'] = 'Draft autosaved on'; // full dformat date will be added $lang['draftdate'] = 'Draft autosaved on'; // full dformat date will be added
$lang['nosecedit'] = 'The page was changed in the meantime, section info was out of date loaded full page instead.';
$lang['regmissing'] = 'Sorry, you must fill in all fields.'; $lang['regmissing'] = 'Sorry, you must fill in all fields.';
$lang['reguexists'] = 'Sorry, a user with this login already exists.'; $lang['reguexists'] = 'Sorry, a user with this login already exists.';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment