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 %}
-

{{ text_edit }}

+

{{ text_form }}

diff --git a/upload/admin/view/template/extension/dashboard/chart_by_country_and_region_info.twig b/upload/admin/view/template/extension/dashboard/chart_by_country_and_region_info.twig index a5536763..77489791 100644 --- a/upload/admin/view/template/extension/dashboard/chart_by_country_and_region_info.twig +++ b/upload/admin/view/template/extension/dashboard/chart_by_country_and_region_info.twig @@ -31,13 +31,14 @@ url: 'index.php?route=extension/dashboard/chart_by_country_and_region/chartByCountry&user_token={{ user_token }}', dataType: 'json', success: function(json) { - if(json.data.length > 1) { + data = json.data || 0; + if (data.length > 1) { const param = {'elem': country_block, 'clickable': true, 'hoverable': true}; - DrawChart(json.data, param); + DrawChart(data, param); setClickByCounries(json.countries); - } else if (json.data.length == 1) { + } else if (data.length == 1) { getByRegion(json.countries[0]); $(region_block).toggleClass('active'); diff --git a/upload/catalog/controller/account/forgotten.php b/upload/catalog/controller/account/forgotten.php index 56b7fd4c..e123a3f2 100644 --- a/upload/catalog/controller/account/forgotten.php +++ b/upload/catalog/controller/account/forgotten.php @@ -69,7 +69,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_account_customer->getTotalCustomersByEmail($this->request->post['email'])) { $this->error['warning'] = $this->language->get('error_email'); diff --git a/upload/install/view/template/common/header.twig b/upload/install/view/template/common/header.twig index cd5817da..be228989 100644 --- a/upload/install/view/template/common/header.twig +++ b/upload/install/view/template/common/header.twig @@ -14,7 +14,7 @@
- +
diff --git a/upload/system/library/seopro.php b/upload/system/library/seopro.php index 9c3b930a..25c36b3a 100644 --- a/upload/system/library/seopro.php +++ b/upload/system/library/seopro.php @@ -472,6 +472,8 @@ private function getKeywordByQuery($query, $language_id = null) { } public function validate() { + $this->detectAjax(); + if (php_sapi_name() === 'cli') { return; }