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): ?> предпросмотр - выйти не сохраняя + выйти из редактора