r73688 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73687‎ | r73688 | r73689 >
Date:22:23, 24 September 2010
Author:neilk
Status:deferred
Tags:
Comment:
stop warnings about missing statuskey param (conditionally defined!)
Modified paths:
  • /branches/uploadwizard/phase3/includes/api/ApiUpload.php (modified) (history)

Diff [purge]

Index: branches/uploadwizard/phase3/includes/api/ApiUpload.php
@@ -182,13 +182,14 @@
183183 * @return bool
184184 */
185185 protected function selectUploadModule() {
 186+ global $wgAllowAsyncCopyUploads;
186187 $request = $this->getMain()->getRequest();
187188
188189 // One and only one of the following parameters is needed
189190 $this->requireOnlyOneParameter( $this->mParams,
190191 'sessionkey', 'file', 'url', 'statuskey' );
191192
192 - if ( $this->mParams['statuskey'] ) {
 193+ if ( $wgAllowAsyncCopyUploads && $this->mParams['statuskey'] ) {
193194 // Status request for an async upload
194195 $sessionData = UploadFromUrlJob::getSessionData( $this->mParams['statuskey'] );
195196 if ( !isset( $sessionData['result'] ) ) {

Status & tagging log