From fd27d340b537ef3a10ac3552e397c99cf2de9485 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Thu, 11 Feb 2010 06:14:15 +0000 Subject: [PATCH] Make sure Firefogg gets the json it needs. --- includes/api/ApiUpload.php | 2 +- includes/upload/UploadFromChunks.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index e99e5d9686..b426262e53 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -249,7 +249,7 @@ class ApiUpload extends ApiBase { $this->getResult()->setIndexedTagName( $result['details'], 'error' ); $this->dieUsage( 'An internal error occurred', 'internal-error', 0, $error ); - } elseif( isset($status->value->uploadUrl) ) { + } elseif( $this->mParams['enablechunks'] ) { return $status->value; } diff --git a/includes/upload/UploadFromChunks.php b/includes/upload/UploadFromChunks.php index 8432d1283a..2feccb4969 100644 --- a/includes/upload/UploadFromChunks.php +++ b/includes/upload/UploadFromChunks.php @@ -164,7 +164,7 @@ class UploadFromChunks extends UploadBase { // firefogg expects a specific result // http://www.firefogg.org/dev/chunk_post.html return Status::newGood( - array('result' => 1, 'done' => 1, 'resultUrl' => $file->getDescriptionUrl() ) + array('result' => 1, 'done' => 1, 'resultUrl' => wfExpandUrl( $file->getDescriptionUrl() ) ) ); } -- 2.20.1