MDL-51531 libraries: Upgrade google libraries to 1.1.5

This commit is contained in:
Damyon Wiese
2015-09-30 13:28:19 +08:00
parent fd57d685c7
commit 80af92f0fe
128 changed files with 51501 additions and 7327 deletions
+11 -4
View File
@@ -15,11 +15,13 @@
* limitations under the License.
*/
require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
if (!class_exists('Google_Client')) {
require_once dirname(__FILE__) . '/../autoload.php';
}
/**
* @author Chirag Shah <[email protected]>
*
* Manage large file uploads, which may be media but can be any type
* of sizable data.
*/
class Google_Http_MediaFileUpload
{
@@ -285,7 +287,7 @@ class Google_Http_MediaFileUpload
}
$message = $code;
$body = @json_decode($response->getResponseBody());
if (!empty( $body->error->errors ) ) {
if (!empty($body->error->errors) ) {
$message .= ': ';
foreach ($body->error->errors as $error) {
$message .= "{$error->domain}, {$error->message};";
@@ -297,4 +299,9 @@ class Google_Http_MediaFileUpload
$this->client->getLogger()->error($error);
throw new Google_Exception($error);
}
public function setChunkSize($chunkSize)
{
$this->chunkSize = $chunkSize;
}
}