From 565fd72f1580962bf60fc46fe179d51ce4900e11 Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Sat, 3 Oct 2015 13:20:16 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=D0=B1=D0=BE=D0=BB=D1=8C=D1=88?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=B4=D0=BE=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BA?= =?UTF-8?q?=D0=B8=20=D0=BF=D0=BE=20=D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=8E=20=D0=BA=D0=BE=D0=BC=D0=BC=D0=B5=D0=BD=D1=82?= =?UTF-8?q?=D0=BE=D0=B2=20=D0=B8=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B5=20?= =?UTF-8?q?=D1=81=20=D1=80=D0=B5=D0=B4=D0=B0=D0=BA=D1=82=D0=BE=D1=80=D0=BE?= =?UTF-8?q?=D0=BC,=20=D0=BF=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20=D0=B2=20?= =?UTF-8?q?=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B5=20=D0=BF=D0=BE=20?= =?UTF-8?q?=D1=80=D0=B0=D0=B7=D0=BC=D0=B5=D1=82=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ground/controllers/ArticleController.php | 4 ++++ ground/views/articles/edit.php | 2 +- ground/views/comments/form.php | 2 ++ ground/views/modals/articleInfo.php | 5 +++-- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ground/controllers/ArticleController.php b/ground/controllers/ArticleController.php index 7df73b9..cfab6ba 100644 --- a/ground/controllers/ArticleController.php +++ b/ground/controllers/ArticleController.php @@ -203,6 +203,10 @@ class ArticleController extends Controller App::error404(); } + if (trim($_POST['text']) == '') { + App::redirect('/'.$_POST['parentType'].'/'.$_POST['parentId']); + } + $text = str_replace(array('<','>'), array('<','>'), $_POST['text']); $html = strip_tags($_POST['text']); diff --git a/ground/views/articles/edit.php b/ground/views/articles/edit.php index 7f749ee..8673714 100644 --- a/ground/views/articles/edit.php +++ b/ground/views/articles/edit.php @@ -19,7 +19,7 @@ id): ?> предпросмотр - выйти не сохраняя + выйти из редактора
status == 'draft') : ?> diff --git a/ground/views/comments/form.php b/ground/views/comments/form.php index d6cafa2..0222220 100644 --- a/ground/views/comments/form.php +++ b/ground/views/comments/form.php @@ -5,8 +5,10 @@
+
+ diff --git a/ground/views/modals/articleInfo.php b/ground/views/modals/articleInfo.php index e589ac3..86201cc 100644 --- a/ground/views/modals/articleInfo.php +++ b/ground/views/modals/articleInfo.php @@ -3,7 +3,7 @@