From 72345613cff72ca49608baa1c2956825858cfb43 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Sun, 29 Jan 2012 21:31:24 +0100 Subject: Fixed a bug in the article editor. when editing a already existing article, the status was always set to visible. --- ratatoeskr/backend.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'ratatoeskr/backend.php') diff --git a/ratatoeskr/backend.php b/ratatoeskr/backend.php index 76e8d25..469d966 100644 --- a/ratatoeskr/backend.php +++ b/ratatoeskr/backend.php @@ -189,11 +189,6 @@ $backend_subactions = url_action_subactions(array( /* Check Form */ $fail_reasons = array(); - $inputs = array( - "date" => time(), - "article_status" => ARTICLE_STATUS_LIVE - ); - if(isset($_POST["save_article"])) { if(!preg_match('/^[a-zA-Z0-9-_]+$/', @$_POST["urlname"])) @@ -256,7 +251,10 @@ $backend_subactions = url_action_subactions(array( { /* New Article */ $ste->vars["pagetitle"] = $translation["new_article"]; - + $inputs = array( + "date" => time(), + "article_status" => ARTICLE_STATUS_LIVE + ); if(empty($fail_reasons) and isset($_POST["save_article"])) { $article = Article::create($inputs["urlname"]); -- cgit v1.2.3-70-g09d2