diff --git a/upload/admin/controller/design/seo_url.php b/upload/admin/controller/design/seo_url.php index 73a044bd..4a2537f1 100644 --- a/upload/admin/controller/design/seo_url.php +++ b/upload/admin/controller/design/seo_url.php @@ -54,6 +54,8 @@ public function add() { $url .= '&page=' . $this->request->get['page']; } + $this->clearSeoCache(); + $this->response->redirect($this->url->link('design/seo_url', 'user_token=' . $this->session->data['user_token'] . $url, true)); } @@ -102,6 +104,8 @@ public function edit() { $url .= '&page=' . $this->request->get['page']; } + $this->clearSeoCache(); + $this->response->redirect($this->url->link('design/seo_url', 'user_token=' . $this->session->data['user_token'] . $url, true)); } @@ -152,6 +156,8 @@ public function delete() { $url .= '&page=' . $this->request->get['page']; } + $this->clearSeoCache(); + $this->response->redirect($this->url->link('design/seo_url', 'user_token=' . $this->session->data['user_token'] . $url, true)); } @@ -411,6 +417,22 @@ protected function getForm() { $url = ''; + if (isset($this->request->get['filter_query'])) { + $url .= '&filter_query=' . urlencode(html_entity_decode($this->request->get['filter_query'], ENT_QUOTES, 'UTF-8')); + } + + if (isset($this->request->get['filter_keyword'])) { + $url .= '&filter_keyword=' . urlencode(html_entity_decode($this->request->get['filter_keyword'], ENT_QUOTES, 'UTF-8')); + } + + if (isset($this->request->get['filter_store_id'])) { + $url .= '&filter_store_id=' . $this->request->get['filter_store_id']; + } + + if (isset($this->request->get['filter_language_id'])) { + $url .= '&filter_language_id=' . $this->request->get['filter_language_id']; + } + if (isset($this->request->get['sort'])) { $url .= '&sort=' . $this->request->get['sort']; } @@ -541,4 +563,10 @@ protected function validateDelete() { return !$this->error; } -} + + private function clearSeoCache() { + if ($this->config->get('config_seo_pro') && $this->config->get('config_seo_url_cache')) { + $this->cache->delete('seopro'); + } + } +} \ No newline at end of file diff --git a/upload/admin/model/design/seo_url.php b/upload/admin/model/design/seo_url.php index ce621e21..ce63dde8 100644 --- a/upload/admin/model/design/seo_url.php +++ b/upload/admin/model/design/seo_url.php @@ -46,8 +46,8 @@ public function getSeoUrls($data = array()) { $sort_data = array( 'query', 'keyword', - 'language_id', - 'store_id' + 'language', + 'store' ); if (isset($data['sort']) && in_array($data['sort'], $sort_data)) {