From 0d36ca21df02f0258651440aadfdaa56584ac34a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Mazi=C3=A8re?= Date: Sat, 27 Aug 2016 11:05:08 +0200 Subject: [PATCH] [CNETBridge] remove useless member $topicName MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pierre Mazière --- bridges/CNETBridge.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/bridges/CNETBridge.php b/bridges/CNETBridge.php index 2fbed359..b92cecc2 100644 --- a/bridges/CNETBridge.php +++ b/bridges/CNETBridge.php @@ -1,8 +1,6 @@ maintainer = 'ORelio'; @@ -43,10 +41,7 @@ class CNETBridge extends BridgeAbstract { return $article_html; } - if (!empty($param['topic']['value'])) - $this->topicName = $param['topic']['value']; - - $pageUrl = 'http://www.cnet.com/'.(empty($this->topicName) ? '' : 'topics/'.$this->topicName.'/'); + $pageUrl = 'http://www.cnet.com/'.(empty($param['topic']['value']) ? '' : 'topics/'.$param['topic']['value'].'/'); $html = $this->getSimpleHTMLDOM($pageUrl) or $this->returnServerError('Could not request CNET: '.$pageUrl); $limit = 0; @@ -78,7 +73,8 @@ class CNETBridge extends BridgeAbstract { } public function getName() { - return 'CNET News Bridge'.(empty($this->topicName) ? '' : ' - '.$this->topicName); + $param=$this->parameters[$this->queriedContext]; + return 'CNET News Bridge'.(empty($param['topic']['value']) ? '' : ' - '.$this->param['topic']['value']); } public function getCacheDuration() {