From a5000351727ae3267cf8688d2b73205c4cd31327 Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Sun, 19 Feb 2023 23:49:40 +0100 Subject: [PATCH] news: Fix category link in both breadcrumb and menu Fixes: #4982 --- e107_core/url/news/url.php | 2 +- e107_handlers/news_class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/e107_core/url/news/url.php b/e107_core/url/news/url.php index 48123c9a8..fee6fda64 100644 --- a/e107_core/url/news/url.php +++ b/e107_core/url/news/url.php @@ -129,7 +129,7 @@ class core_news_url extends eUrlConfig break; case 'category': - if(!vartrue($params['id'])) + if(!vartrue($params['category_id'])) { $url .= 'default.0.'.$page; } diff --git a/e107_handlers/news_class.php b/e107_handlers/news_class.php index 2408fbc70..3df96a89a 100644 --- a/e107_handlers/news_class.php +++ b/e107_handlers/news_class.php @@ -999,7 +999,7 @@ class e_news_category_item extends e_front_model public function sc_news_category_url($parm = '') { - $url = e107::getUrl()->create('news/list/category', array('id' => $this->getId(), 'name' => $this->cat('sef'))); + $url = e107::getUrl()->create('news/list/category', array($this->getFieldIdName() => $this->getId(), 'name' => $this->cat('sef'))); switch($parm) { case 'link':