From ee6dc8cc925413ac70f0bed6c9b3d8ddbc3f3a11 Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Thu, 24 Sep 2015 10:32:45 +0300 Subject: [PATCH] =?UTF-8?q?ADD=20=D1=81=D0=BE=D1=85=D1=80=D0=B0=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=87=D0=B5=D1=80=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=B8=D0=BA=D0=B0=20=D0=B7=D0=B0=D0=BF=D0=B8=D1=81=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ground/controllers/ArticlesController.php | 2 ++ ground/views/articles/edit.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ground/controllers/ArticlesController.php b/ground/controllers/ArticlesController.php index 1b83f32..2e148cc 100644 --- a/ground/controllers/ArticlesController.php +++ b/ground/controllers/ArticlesController.php @@ -98,6 +98,8 @@ class ArticlesController extends Controller $article->title = $title; $article->text = $text; $article->html = $html; + $article->status = (isset($_POST['save']) && $_POST['save'] == 'published') ? 'published' : 'draft'; + $article->pubDate = time(); $article->photoId = Helper::getFirstImg($text); $article->allowComments = $allowComments; $article->save(); diff --git a/ground/views/articles/edit.php b/ground/views/articles/edit.php index e323049..e99854f 100644 --- a/ground/views/articles/edit.php +++ b/ground/views/articles/edit.php @@ -22,7 +22,8 @@ не сохранять
- + +