diff --git a/upload/admin/controller/blog/article.php b/upload/admin/controller/blog/article.php index 5018cf82..deca4bae 100644 --- a/upload/admin/controller/blog/article.php +++ b/upload/admin/controller/blog/article.php @@ -411,6 +411,7 @@ protected function getList() { } protected function getForm() { + $data['text_form'] = !isset($this->request->get['article_id']) ? $this->language->get('text_add') : $this->language->get('text_edit'); if (isset($this->error['warning'])) { $data['error_warning'] = $this->error['warning']; diff --git a/upload/admin/controller/blog/category.php b/upload/admin/controller/blog/category.php index 8440ff00..5b0210ff 100644 --- a/upload/admin/controller/blog/category.php +++ b/upload/admin/controller/blog/category.php @@ -160,9 +160,9 @@ protected function getList() { if (isset($this->request->get['path'])) { if ($this->request->get['path'] != '') { - $this->path = explode('_', $this->request->get['path']); - $this->blog_category_id = end($this->path); - $this->session->data['path'] = $this->request->get['path']; + $this->path = explode('_', $this->request->get['path']); + $this->blog_category_id = end($this->path); + $this->session->data['path'] = $this->request->get['path']; } else { unset($this->session->data['path']); } @@ -206,6 +206,7 @@ protected function getList() { } protected function getForm() { + $data['text_form'] = !isset($this->request->get['blog_category_id']) ? $this->language->get('text_add') : $this->language->get('text_edit'); if (isset($this->error['warning'])) { $data['error_warning'] = $this->error['warning']; diff --git a/upload/admin/controller/common/forgotten.php b/upload/admin/controller/common/forgotten.php index d496d654..98b3a2b6 100644 --- a/upload/admin/controller/common/forgotten.php +++ b/upload/admin/controller/common/forgotten.php @@ -63,7 +63,7 @@ public function index() { } protected function validate() { - if (!isset($this->request->post['email'])) { + if (!isset($this->request->post['email']) || !trim($this->request->post['email'])) { $this->error['warning'] = $this->language->get('error_email'); } elseif (!$this->model_user_user->getTotalUsersByEmail($this->request->post['email'])) { $this->error['warning'] = $this->language->get('error_email'); diff --git a/upload/admin/controller/extension/dashboard/chart_by_country_and_region.php b/upload/admin/controller/extension/dashboard/chart_by_country_and_region.php index d7d602e4..1852a753 100644 --- a/upload/admin/controller/extension/dashboard/chart_by_country_and_region.php +++ b/upload/admin/controller/extension/dashboard/chart_by_country_and_region.php @@ -125,7 +125,7 @@ public function chartByCountry() { $results = $this->model_extension_dashboard_chart_by_country_and_region->getTotalOrdersByCountry(); - if($results) { + if ($results) { foreach ($results as $key => $result) { $json['data'][] = [ 'country_id'=> $result['country_id'], @@ -140,4 +140,4 @@ public function chartByCountry() { $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } -} +} \ No newline at end of file diff --git a/upload/admin/view/template/blog/article_form.twig b/upload/admin/view/template/blog/article_form.twig index 5f057850..d29eaa10 100644 --- a/upload/admin/view/template/blog/article_form.twig +++ b/upload/admin/view/template/blog/article_form.twig @@ -20,7 +20,7 @@ {% endif %}