From 4b5f1f8d58f2a505b1d23f3b4c37b3114a5dd331 Mon Sep 17 00:00:00 2001 From: Eric Klien Date: Sat, 18 Jul 2015 12:27:25 -0700 Subject: [PATCH 1/4] Update codebird.php for redirected files. Find files that have been redirected. --- src/codebird.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/codebird.php b/src/codebird.php index a2cd342..5784a44 100644 --- a/src/codebird.php +++ b/src/codebird.php @@ -1269,6 +1269,8 @@ protected function _buildMultipart($method, $params) // use hardcoded download timeouts for now curl_setopt($ch, _CURLOPT_TIMEOUT_MS, 5000); curl_setopt($ch, _CURLOPT_CONNECTTIMEOUT_MS, 2000); + // find files that have been redirected + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); $result = curl_exec($ch); if ($result !== false) { $value = $result; From 30a76976c20d01db91a55133110e187678c837a4 Mon Sep 17 00:00:00 2001 From: "J.M" Date: Sun, 16 Aug 2015 20:32:36 +0200 Subject: [PATCH 2/4] Add Changelog entry for #124 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 0a8d4d8..14af63d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,9 @@ codebird-php - changelog ======================== +2.7.1 (not yet released) ++ #124 Download redirected remote images + 2.7.0 (2015-05-14) - #92, #108 Fix issues with uploading special chars + #109 Proxy support From d78520be2f7c104dd52352bee95c9e43a25c30e9 Mon Sep 17 00:00:00 2001 From: "J.M" Date: Sun, 16 Aug 2015 20:39:04 +0200 Subject: [PATCH 3/4] Set version to 2.7.1 --- bower.json | 2 +- src/codebird.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bower.json b/bower.json index 4abf678..88726dc 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "codebird-php", - "version": "2.7.0", + "version": "2.7.1", "homepage": "http://www.jublo.net/projects/codebird/php", "authors": [ "Joshua Atkins ", diff --git a/src/codebird.php b/src/codebird.php index 5784a44..0b07234 100644 --- a/src/codebird.php +++ b/src/codebird.php @@ -6,7 +6,7 @@ * A Twitter library in PHP. * * @package codebird - * @version 2.7.0 + * @version 2.7.1 * @author Jublo Solutions * @copyright 2010-2015 Jublo Solutions * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License 3.0 @@ -104,7 +104,7 @@ class Codebird /** * The current Codebird version */ - protected $_version = '2.7.0'; + protected $_version = '2.7.1'; /** * Auto-detect cURL absence @@ -716,7 +716,7 @@ protected function getCurlInitialization($url) protected function getNoCurlInitialization($url, $contextOptions, $hostname = '') { $httpOptions = array(); - + $httpOptions['header'] = array( 'User-Agent: codebird-php ' . $this->getVersion() . ' by Jublo Solutions ' ); From 03045feadf7e66d9edd742ebf419e428b74d7105 Mon Sep 17 00:00:00 2001 From: "J.M" Date: Sun, 16 Aug 2015 20:39:11 +0200 Subject: [PATCH 4/4] Set release date for 2.7.1 --- CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 14af63d..09f6cda 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,7 @@ codebird-php - changelog ======================== -2.7.1 (not yet released) +2.7.1 (2015-08-16) + #124 Download redirected remote images 2.7.0 (2015-05-14)