From: Alexandre Emsenhuber Date: Fri, 4 Sep 2009 20:12:48 +0000 (+0000) Subject: use wfScript() so that it uses $wgScriptExtension to get the path to api.php(5) X-Git-Tag: 1.31.0-rc.0~39918 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/message.php?a=commitdiff_plain;h=2684a9fd3b203872f6825260573f55a65bc0d2ea;p=lhc%2Fweb%2Fwiklou.git use wfScript() so that it uses $wgScriptExtension to get the path to api.php(5) --- diff --git a/includes/upload/UploadFromChunks.php b/includes/upload/UploadFromChunks.php index f775f9215a..83b2734ecd 100644 --- a/includes/upload/UploadFromChunks.php +++ b/includes/upload/UploadFromChunks.php @@ -155,7 +155,7 @@ class UploadFromChunks extends UploadBase { // Lets us return an api result (as flow for chunk uploads is kind of different than others. function performUpload( $summary = '', $comment = '', $watch = '', $user ){ - global $wgServer, $wgScriptPath, $wgUser; + global $wgUser; if( $this->chunk_mode == UploadFromChunks::INIT ){ // firefogg expects a specific result per: @@ -168,7 +168,7 @@ class UploadFromChunks extends UploadBase { $token = urlencode( $wgUser->editToken() ); ob_clean(); echo ApiFormatJson::getJsonEncode( array( - 'uploadUrl' => "{$wgServer}{$wgScriptPath}/api.php?action=upload&". + 'uploadUrl' => wfExpandUrl( wfScript( 'api' ) ) . "?action=upload&". "token={$token}&format=json&enablechunks=true&chunksessionkey=". $this->setupChunkSession( $summary, $comment, $watch ) ) ); exit( 0 );