From 351e1e9a6ae77b4fba8e2267b85d778fff5922a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Mazi=C3=A8re?= Date: Mon, 29 Aug 2016 23:36:49 +0200 Subject: [PATCH] [TwitterBridge] code simplification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pierre Mazière --- bridges/TwitterBridge.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bridges/TwitterBridge.php b/bridges/TwitterBridge.php index 0c8f2a7..6a42b54 100644 --- a/bridges/TwitterBridge.php +++ b/bridges/TwitterBridge.php @@ -86,7 +86,7 @@ class TwitterBridge extends BridgeAbstract{ // get TweetID $item['id'] = $tweet->getAttribute('data-tweet-id'); // get tweet link - $item['uri'] = 'https://twitter.com'.$tweet->find('a.js-permalink', 0)->getAttribute('href'); + $item['uri'] = $this->uri.$tweet->find('a.js-permalink', 0)->getAttribute('href'); // extract tweet timestamp $item['timestamp'] = $tweet->find('span.js-short-timestamp', 0)->getAttribute('data-time'); // generate the title @@ -111,7 +111,7 @@ class TwitterBridge extends BridgeAbstract{ } // get tweet text - $cleanedTweet = str_replace('href="/', 'href="https://twitter.com/', $tweet->find('p.js-tweet-text', 0)->innertext); + $cleanedTweet = str_replace('href="/', 'href="'.$this->uri, $tweet->find('p.js-tweet-text', 0)->innertext); // Add picture to content $picture_html = '';