diff options
-rw-r--r-- | inc/actions.php | 4 |
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', |