From 6e3f08e9d32125ff6fcd7cbbabcbe0d59172b655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Mazi=C3=A8re?= Date: Tue, 30 Aug 2016 00:11:25 +0200 Subject: [PATCH] [WorldOfTanksBridge] code simplification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pierre Mazière --- bridges/WorldOfTanksBridge.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/bridges/WorldOfTanksBridge.php b/bridges/WorldOfTanksBridge.php index 53842217..deda7167 100644 --- a/bridges/WorldOfTanksBridge.php +++ b/bridges/WorldOfTanksBridge.php @@ -27,11 +27,7 @@ class WorldOfTanksBridge extends HttpCachingBridgeAbstract{ )); function getURI(){ - $lang='fr'; - if (!empty($this->getInput('lang'))) { - $lang = $this->getInput('lang'); - } - + $lang = $this->getInput('lang'); $uri = $this->uri.$lang.'/news/'; if(!empty($this->getInput('category'))) { $uri .= 'pc-browser/'.$this->getInput('category')."/"; @@ -40,7 +36,8 @@ class WorldOfTanksBridge extends HttpCachingBridgeAbstract{ } public function collectData(){ - $html = $this->getSimpleHTMLDOM($this->getURI()) or $this->returnServerError('Could not request '.$this->getURI()); + $html = $this->getSimpleHTMLDOM($this->getURI()) + or $this->returnServerError('Could not request '.$this->getURI()); $this->debugMessage("loaded HTML from ".$this->getURI()); // customize name $this->name = $html->find('title', 0)->innertext;