Index: trunk/phase3/includes/upload/UploadFromChunks.php |
— | — | @@ -155,7 +155,7 @@ |
156 | 156 | |
157 | 157 | // Lets us return an api result (as flow for chunk uploads is kind of different than others. |
158 | 158 | function performUpload( $summary = '', $comment = '', $watch = '', $user ){ |
159 | | - global $wgServer, $wgScriptPath, $wgUser; |
| 159 | + global $wgUser; |
160 | 160 | |
161 | 161 | if( $this->chunk_mode == UploadFromChunks::INIT ){ |
162 | 162 | // firefogg expects a specific result per: |
— | — | @@ -168,7 +168,7 @@ |
169 | 169 | $token = urlencode( $wgUser->editToken() ); |
170 | 170 | ob_clean(); |
171 | 171 | echo ApiFormatJson::getJsonEncode( array( |
172 | | - 'uploadUrl' => "{$wgServer}{$wgScriptPath}/api.php?action=upload&". |
| 172 | + 'uploadUrl' => wfExpandUrl( wfScript( 'api' ) ) . "?action=upload&". |
173 | 173 | "token={$token}&format=json&enablechunks=true&chunksessionkey=". |
174 | 174 | $this->setupChunkSession( $summary, $comment, $watch ) ) ); |
175 | 175 | exit( 0 ); |