summaryrefslogtreecommitdiff
path: root/inc/actions.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2011-05-02 20:58:58 +0200
committerAndreas Gohr <andi@splitbrain.org>2011-05-02 20:58:58 +0200
commitc828a5d633b52769471bce1544287c99de2775ce (patch)
tree62d15cdfc594aa87df2caaaeca750767221f9cba /inc/actions.php
parentf93f616806e78bf16ccc0103f3c1c9b73fa06313 (diff)
downloadrpg-c828a5d633b52769471bce1544287c99de2775ce.tar.gz
rpg-c828a5d633b52769471bce1544287c99de2775ce.tar.bz2
execute edit action when draft was specified but no draft exists FS#2240
Diffstat (limited to 'inc/actions.php')
-rw-r--r--inc/actions.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/inc/actions.php b/inc/actions.php
index fa11bb7f1..a36fdfd5b 100644
--- a/inc/actions.php
+++ b/inc/actions.php
@@ -190,6 +190,7 @@ function act_sendheaders($headers) {
function act_clean($act){
global $lang;
global $conf;
+ global $INFO;
// check if the action was given as array key
if(is_array($act)){
@@ -219,6 +220,9 @@ function act_clean($act){
return 'show';
}
+ //is there really a draft?
+ if($act == 'draft' && !file_exists($INFO['draft'])) return 'edit';
+
if(!in_array($act,array('login','logout','register','save','cancel','edit','draft',
'preview','search','show','check','index','revisions',
'diff','recent','backlink','admin','subscribe','revert',