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 @@