Merge "Revert "Setting up a way to have uploading by URL, but not on Special:Upload""
authorKaldari <rkaldari@wikimedia.org>
Fri, 31 Aug 2012 00:06:33 +0000 (00:06 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 31 Aug 2012 00:06:33 +0000 (00:06 +0000)
1  2 
includes/DefaultSettings.php
includes/specials/SpecialUpload.php

@@@ -385,9 -385,7 +385,9 @@@ $wgImgAuthPublicTest = true
   *                      some remote repos.
   *   - thumbDir         The base thumbnail directory. Defaults to "<directory>/thumb".
   *   - thumbUrl         The base thumbnail URL. Defaults to "<url>/thumb".
 - *
 + *   - isPrivate        Set this if measures should always be taken to keep the files private.
 + *                      One should not trust this to assure that the files are not web readable;
 + *                      the server configuration should be done manually depending on the backend.
   *
   * These settings describe a foreign MediaWiki installation. They are optional, and will be ignored
   * for local repositories:
@@@ -526,13 -524,6 +526,6 @@@ $wgAllowAsyncCopyUploads = false
   */
  $wgCopyUploadsDomains = array();
  
- /**
-  * Enable copy uploads from Special:Upload. $wgAllowCopyUploads must also be
-  * true. If $wgAllowCopyUploads is true, but this is false, you will only be
-  * able to perform copy uploads from the API or extensions (e.g. UploadWizard).
-  */
- $wgCopyUploadsFromSpecialUpload = false;
  /**
   * Max size for uploads, in bytes. If not set to an array, applies to all
   * uploads. If set to an array, per upload type maximums can be set, using the
@@@ -1317,10 -1308,6 +1310,10 @@@ $wgDBuser = 'wikiuser'
  $wgDBpassword = '';
  /** Database type */
  $wgDBtype = 'mysql';
 +/** Whether to use SSL in DB connection. */
 +$wgDBssl = false;
 +/** Whether to use compression in DB connection. */
 +$wgDBcompress = false;
  
  /** Separate username for maintenance tasks. Leave as null to use the default. */
  $wgDBadminuser = null;
@@@ -1406,8 -1393,6 +1399,8 @@@ $wgSharedTables = array( 'user', 'user_
   *                  - DBO_IGNORE -- ignore errors (not useful in LocalSettings.php)
   *                  - DBO_NOBUFFER -- turn off buffering (not useful in LocalSettings.php)
   *                  - DBO_PERSISTENT -- enables persistent database connections
 + *                  - DBO_SSL -- uses SSL/TLS encryption in database connections, if available
 + *                  - DBO_COMPRESS -- uses internal compression in database connections, if available
   *
   *   - max lag:     (optional) Maximum replication lag before a slave will taken out of rotation
   *   - max threads: (optional) Maximum number of running threads
@@@ -1451,26 -1436,11 +1444,26 @@@ $wgMasterWaitTimeout = 10
  
  /** File to log database errors to */
  $wgDBerrorLog = false;
 +
  /**
 - * Override wiki timezone to UTC for wgDBerrorLog
 + * Timezone to use in the error log.
 + * Defaults to the wiki timezone ($wgLocalTimezone).
 + *
 + * A list of useable timezones can found at:
 + * http://php.net/manual/en/timezones.php
 + *
 + * @par Examples:
 + * @code
 + * $wgLocaltimezone = 'UTC';
 + * $wgLocaltimezone = 'GMT';
 + * $wgLocaltimezone = 'PST8PDT';
 + * $wgLocaltimezone = 'Europe/Sweden';
 + * $wgLocaltimezone = 'CET';
 + * @endcode
 + *
   * @since 1.20
   */
 -$wgDBerrorLogInUTC = false;
 +$wgDBerrorLogTZ = false;
  
  /** When to give an error message */
  $wgDBClusterTimeout = 10;
@@@ -1689,13 -1659,6 +1682,13 @@@ $wgMessageCacheType = CACHE_ANYTHING
   */
  $wgParserCacheType = CACHE_ANYTHING;
  
 +/**
 + * The cache type for storing session data. Used if $wgSessionsInObjectCache is true.
 + *
 + * For available types see $wgMainCacheType.
 + */
 +$wgSessionCacheType = CACHE_ANYTHING;
 +
  /**
   * The cache type for storing language conversion tables,
   * which are used when parsing certain text and interface messages.
@@@ -1751,26 -1714,12 +1744,26 @@@ $wgParserCacheExpireTime = 86400
  $wgDBAhandler = 'db3';
  
  /**
 - * Store sessions in MemCached. This can be useful to improve performance, or to
 - * avoid the locking behaviour of PHP's default session handler, which tends to
 - * prevent multiple requests for the same user from acting concurrently.
 + * Deprecated alias for $wgSessionsInObjectCache.
 + *
 + * @deprecated Use $wgSessionsInObjectCache
   */
  $wgSessionsInMemcached = false;
  
 +/**
 + * Store sessions in an object cache, configured by $wgSessionCacheType. This
 + * can be useful to improve performance, or to avoid the locking behaviour of
 + * PHP's default session handler, which tends to prevent multiple requests for
 + * the same user from acting concurrently.
 + */
 +$wgSessionsInObjectCache = false;
 +
 +/**
 + * The expiry time to use for session storage when $wgSessionsInObjectCache is
 + * enabled, in seconds.
 + */
 +$wgObjectCacheSessionExpiry = 3600;
 +
  /**
   * This is used for setting php's session.save_handler. In practice, you will
   * almost never need to change this ever. Other options might be 'user' or
@@@ -1794,7 -1743,7 +1787,7 @@@ $wgMemCachedPersistent = false
  /**
   * Read/write timeout for MemCached server communication, in microseconds.
   */
 -$wgMemCachedTimeout = 100000;
 +$wgMemCachedTimeout = 500000;
  
  /**
   * Set this to true to make a local copy of the message cache, for use in
@@@ -2332,16 -2281,16 +2325,16 @@@ $wgVariantArticlePath = false
  $wgLoginLanguageSelector = false;
  
  /**
 - * When translating messages with wfMsg(), it is not always clear what should
 - * be considered UI messages and what should be content messages.
 + * When translating messages with wfMessage(), it is not always clear what
 + * should be considered UI messages and what should be content messages.
   *
   * For example, for the English Wikipedia, there should be only one 'mainpage',
   * so when getting the link for 'mainpage', we should treat it as site content
 - * and call wfMsgForContent(), but for rendering the text of the link, we call
 - * wfMsg(). The code behaves this way by default. However, sites like the
 - * Wikimedia Commons do offer different versions of 'mainpage' and the like for
 - * different languages. This array provides a way to override the default
 - * behavior.
 + * and call ->inContentLanguage()->text(), but for rendering the text of the
 + * link, we call ->text(). The code behaves this way by default. However,
 + * sites like the Wikimedia Commons do offer different versions of 'mainpage'
 + * and the like for different languages. This array provides a way to override
 + * the default behavior.
   *
   * @par Example:
   * To allow language-specific main page and community
@@@ -2363,12 -2312,8 +2356,12 @@@ $wgForceUIMsgAsContentMsg = array()
   * Timezones can be translated by editing MediaWiki messages of type
   * timezone-nameinlowercase like timezone-utc.
   *
 + * A list of useable timezones can found at:
 + * http://php.net/manual/en/timezones.php
 + *
   * @par Examples:
   * @code
 + * $wgLocaltimezone = 'UTC';
   * $wgLocaltimezone = 'GMT';
   * $wgLocaltimezone = 'PST8PDT';
   * $wgLocaltimezone = 'Europe/Sweden';
@@@ -2740,14 -2685,6 +2733,14 @@@ $wgBetterDirectionality = true
   */
  $wgSend404Code = true;
  
 +
 +/**
 + * The $wgShowRollbackEditCount variable is used to show how many edits will be
 + * rollback. The numeric value of the varible are the limit up to are counted.
 + * If the value is false or 0, the edits are not counted.
 + */
 +$wgShowRollbackEditCount = 10;
 +
  /** @} */ # End of output format settings }
  
  /*************************************************************************//**
   *      'scripts' => 'myExtension.js',
   *      'styles' => 'myExtension.css',
   *      'dependencies' => array( 'jquery.cookie', 'jquery.tabIndex' ),
 - *      'localBasePath' => dirname( __FILE__ ),
 + *      'localBasePath' => __DIR__,
   *      'remoteExtPath' => 'MyExtension',
   *   );
   * @endcode
@@@ -5219,7 -5156,7 +5212,7 @@@ $wgExtensionFunctions = array()
   *
   * @par Example:
   * @code
 - *    $wgExtensionMessagesFiles['ConfirmEdit'] = dirname(__FILE__).'/ConfirmEdit.i18n.php';
 + *    $wgExtensionMessagesFiles['ConfirmEdit'] = __DIR__.'/ConfirmEdit.i18n.php';
   * @endcode
   */
  $wgExtensionMessagesFiles = array();
@@@ -5672,7 -5609,6 +5665,7 @@@ $wgSpecialPageGroups = array
        'Mostlinkedtemplates'       => 'highuse',
        'Mostcategories'            => 'highuse',
        'Mostimages'                => 'highuse',
 +      'Mostinterwikis'            => 'highuse',
        'Mostrevisions'             => 'highuse',
  
        'Allpages'                  => 'pages',
@@@ -6201,11 -6137,6 +6194,11 @@@ $wgSeleniumConfigFile = null
  $wgDBtestuser = ''; //db user that has permission to create and drop the test databases only
  $wgDBtestpassword = '';
  
 +/**
 + * Whether the user must enter their password to change their e-mail address
 + */
 +$wgRequirePasswordforEmailChange = true;
 +
  /**
   * For really cool vim folding this needs to be at the end:
   * vim: foldmarker=@{,@} foldmethod=marker
@@@ -235,7 -235,7 +235,7 @@@ class SpecialUpload extends SpecialPag
                        !$this->mTokenOk && !$this->mCancelUpload &&
                        ( $this->mUpload && $this->mUploadClicked )
                ) {
 -                      $form->addPreText( wfMsgExt( 'session_fail_preview', 'parseinline' ) );
 +                      $form->addPreText( $this->msg( 'session_fail_preview' )->parse() );
                }
  
                # Give a notice if the user is uploading a file that has been deleted or moved
  
                # Add text to form
                $form->addPreText( '<div id="uploadtext">' .
 -                      wfMsgExt( 'uploadtext', 'parse', array( $this->mDesiredDestName ) ) .
 +                      $this->msg( 'uploadtext', array( $this->mDesiredDestName ) )->parseAsBlock() .
                        '</div>' );
                # Add upload error message
                $form->addPreText( $message );
  
                # Add footer to form
 -              $uploadFooter = wfMessage( 'uploadfooter' );
 +              $uploadFooter = $this->msg( 'uploadfooter' );
                if ( !$uploadFooter->isDisabled() ) {
                        $form->addPostText( '<div id="mw-upload-footer-message">'
 -                              . $this->getOutput()->parse( $uploadFooter->plain() ) . "</div>\n" );
 +                              . $uploadFooter->parseAsBlock() . "</div>\n" );
                }
  
                return $form;
                if( $title instanceof Title ) {
                        $count = $title->isDeleted();
                        if ( $count > 0 && $user->isAllowed( 'deletedhistory' ) ) {
 -                              $link = wfMsgExt(
 -                                      $user->isAllowed( 'delete' ) ? 'thisisdeleted' : 'viewdeleted',
 -                                      array( 'parse', 'replaceafter' ),
 -                                      Linker::linkKnown(
 -                                              SpecialPage::getTitleFor( 'Undelete', $title->getPrefixedText() ),
 -                                              wfMsgExt( 'restorelink', array( 'parsemag', 'escape' ), $count )
 -                                      )
 +                              $restorelink = Linker::linkKnown(
 +                                      SpecialPage::getTitleFor( 'Undelete', $title->getPrefixedText() ),
 +                                      $this->msg( 'restorelink' )->numParams( $count )->escaped()
                                );
 +                              $link = $this->msg( $user->isAllowed( 'delete' ) ? 'thisisdeleted' : 'viewdeleted' )
 +                                      ->rawParams( $restorelink )->parseAsBlock();
                                $this->getOutput()->addHTML( "<div id=\"contentSub2\">{$link}</div>" );
                        }
                }
         */
        protected function showRecoverableUploadError( $message ) {
                $sessionKey = $this->mUpload->stashSession();
 -              $message = '<h2>' . wfMsgHtml( 'uploaderror' ) . "</h2>\n" .
 +              $message = '<h2>' . $this->msg( 'uploaderror' )->escaped() . "</h2>\n" .
                        '<div class="error">' . $message . "</div>\n";
  
                $form = $this->getUploadForm( $message, $sessionKey );
 -              $form->setSubmitText( wfMsg( 'upload-tryagain' ) );
 +              $form->setSubmitText( $this->msg( 'upload-tryagain' )->escaped() );
                $this->showUploadForm( $form );
        }
        /**
  
                $sessionKey = $this->mUpload->stashSession();
  
 -              $warningHtml = '<h2>' . wfMsgHtml( 'uploadwarning' ) . "</h2>\n"
 +              $warningHtml = '<h2>' . $this->msg( 'uploadwarning' )->escaped() . "</h2>\n"
                        . '<ul class="warning">';
                foreach( $warnings as $warning => $args ) {
                        if( $warning == 'exists' ) {
                        } elseif( $warning == 'duplicate' ) {
                                $msg = self::getDupeWarning( $args );
                        } elseif( $warning == 'duplicate-archive' ) {
 -                              $msg = "\t<li>" . wfMsgExt( 'file-deleted-duplicate', 'parseinline',
 -                                              array( Title::makeTitle( NS_FILE, $args )->getPrefixedText() ) )
 +                              $msg = "\t<li>" . $this->msg( 'file-deleted-duplicate',
 +                                              Title::makeTitle( NS_FILE, $args )->getPrefixedText() )->parse()
                                        . "</li>\n";
                        } else {
                                if ( $args === true ) {
                                } elseif ( !is_array( $args ) ) {
                                        $args = array( $args );
                                }
 -                              $msg = "\t<li>" . wfMsgExt( $warning, 'parseinline', $args ) . "</li>\n";
 +                              $msg = "\t<li>" . $this->msg( $warning, $args )->parse() . "</li>\n";
                        }
                        $warningHtml .= $msg;
                }
                $warningHtml .= "</ul>\n";
 -              $warningHtml .= wfMsgExt( 'uploadwarning-text', 'parse' );
 +              $warningHtml .= $this->msg( 'uploadwarning-text' )->parseAsBlock();
  
                $form = $this->getUploadForm( $warningHtml, $sessionKey, /* $hideIgnoreWarning */ true );
 -              $form->setSubmitText( wfMsg( 'upload-tryagain' ) );
 -              $form->addButton( 'wpUploadIgnoreWarning', wfMsg( 'ignorewarning' ) );
 -              $form->addButton( 'wpCancelUpload', wfMsg( 'reuploaddesc' ) );
 +              $form->setSubmitText( $this->msg( 'upload-tryagain' )->text() );
 +              $form->addButton( 'wpUploadIgnoreWarning', $this->msg( 'ignorewarning' )->text() );
 +              $form->addButton( 'wpCancelUpload', $this->msg( 'reuploaddesc' )->text() );
  
                $this->showUploadForm( $form );
  
         * @param $message string HTML string
         */
        protected function showUploadError( $message ) {
 -              $message = '<h2>' . wfMsgHtml( 'uploadwarning' ) . "</h2>\n" .
 +              $message = '<h2>' . $this->msg( 'uploadwarning' )->escaped() . "</h2>\n" .
                        '<div class="error">' . $message . "</div>\n";
                $this->showUploadForm( $this->getUploadForm( $message ) );
        }
                $permErrors = $this->mUpload->verifyTitlePermissions( $this->getUser() );
                if( $permErrors !== true ) {
                        $code = array_shift( $permErrors[0] );
 -                      $this->showRecoverableUploadError( wfMsgExt( $code,
 -                                      'parseinline', $permErrors[0] ) );
 +                      $this->showRecoverableUploadError( $this->msg( $code, $permErrors[0] )->parse() );
                        return;
                }
  
                        if ( in_array( $msgName, $wgForceUIMsgAsContentMsg ) ) {
                                $msg[$msgName] = "{{int:$msgName}}";
                        } else {
 -                              $msg[$msgName] = wfMsgForContent( $msgName );
 +                              $msg[$msgName] = wfMessage( $msgName )->inContentLanguage()->text();
                        }
                }
  
  
                        /** Statuses that only require name changing **/
                        case UploadBase::MIN_LENGTH_PARTNAME:
 -                              $this->showRecoverableUploadError( wfMsgHtml( 'minlength1' ) );
 +                              $this->showRecoverableUploadError( $this->msg( 'minlength1' )->escaped() );
                                break;
                        case UploadBase::ILLEGAL_FILENAME:
 -                              $this->showRecoverableUploadError( wfMsgExt( 'illegalfilename',
 -                                      'parseinline', $details['filtered'] ) );
 +                              $this->showRecoverableUploadError( $this->msg( 'illegalfilename',
 +                                      $details['filtered'] )->parse() );
                                break;
                        case UploadBase::FILENAME_TOO_LONG:
 -                              $this->showRecoverableUploadError( wfMsgHtml( 'filename-toolong' ) );
 +                              $this->showRecoverableUploadError( $this->msg( 'filename-toolong' )->escaped() );
                                break;
                        case UploadBase::FILETYPE_MISSING:
 -                              $this->showRecoverableUploadError( wfMsgExt( 'filetype-missing',
 -                                      'parseinline' ) );
 +                              $this->showRecoverableUploadError( $this->msg( 'filetype-missing' )->parse() );
                                break;
                        case UploadBase::WINDOWS_NONASCII_FILENAME:
 -                              $this->showRecoverableUploadError( wfMsgExt( 'windows-nonascii-filename',
 -                                      'parseinline' ) );
 +                              $this->showRecoverableUploadError( $this->msg( 'windows-nonascii-filename' )->parse() );
                                break;
  
                        /** Statuses that require reuploading **/
                        case UploadBase::EMPTY_FILE:
 -                              $this->showUploadError( wfMsgHtml( 'emptyfile' ) );
 +                              $this->showUploadError( $this->msg( 'emptyfile' )->escaped() );
                                break;
                        case UploadBase::FILE_TOO_LARGE:
 -                              $this->showUploadError( wfMsgHtml( 'largefileserver' ) );
 +                              $this->showUploadError( $this->msg( 'largefileserver' )->escaped() );
                                break;
                        case UploadBase::FILETYPE_BADTYPE:
 -                              $msg = wfMessage( 'filetype-banned-type' );
 +                              $msg = $this->msg( 'filetype-banned-type' );
                                if ( isset( $details['blacklistedExt'] ) ) {
                                        $msg->params( $this->getLanguage()->commaList( $details['blacklistedExt'] ) );
                                } else {
                        case UploadBase::VERIFICATION_ERROR:
                                unset( $details['status'] );
                                $code = array_shift( $details['details'] );
 -                              $this->showUploadError( wfMsgExt( $code, 'parseinline', $details['details'] ) );
 +                              $this->showUploadError( $this->msg( $code, $details['details'] )->parse() );
                                break;
                        case UploadBase::HOOK_ABORTED:
                                if ( is_array( $details['error'] ) ) { # allow hooks to return error details in an array
                                        $args = null;
                                }
  
 -                              $this->showUploadError( wfMsgExt( $error, 'parseinline', $args ) );
 +                              $this->showUploadError( $this->msg( $error, $args )->parse() );
                                break;
                        default:
                                throw new MWException( __METHOD__ . ": Unknown value `{$details['status']}`" );
  
                if( $exists['warning'] == 'exists' ) {
                        // Exact match
 -                      $warning = wfMsgExt( 'fileexists', 'parseinline', $filename );
 +                      $warning = wfMessage( 'fileexists', $filename )->parse();
                } elseif( $exists['warning'] == 'page-exists' ) {
                        // Page exists but file does not
 -                      $warning = wfMsgExt( 'filepageexists', 'parseinline', $filename );
 +                      $warning = wfMessage( 'filepageexists', $filename )->parse();
                } elseif ( $exists['warning'] == 'exists-normalized' ) {
 -                      $warning = wfMsgExt( 'fileexists-extension', 'parseinline', $filename,
 -                              $exists['normalizedFile']->getTitle()->getPrefixedText() );
 +                      $warning = wfMessage( 'fileexists-extension', $filename,
 +                              $exists['normalizedFile']->getTitle()->getPrefixedText() )->parse();
                } elseif ( $exists['warning'] == 'thumb' ) {
                        // Swapped argument order compared with other messages for backwards compatibility
 -                      $warning = wfMsgExt( 'fileexists-thumbnail-yes', 'parseinline',
 -                              $exists['thumbFile']->getTitle()->getPrefixedText(), $filename );
 +                      $warning = wfMessage( 'fileexists-thumbnail-yes', 
 +                              $exists['thumbFile']->getTitle()->getPrefixedText(), $filename )->parse();
                } elseif ( $exists['warning'] == 'thumb-name' ) {
                        // Image w/o '180px-' does not exists, but we do not like these filenames
                        $name = $file->getName();
                        $badPart = substr( $name, 0, strpos( $name, '-' ) + 1 );
 -                      $warning = wfMsgExt( 'file-thumbnail-no', 'parseinline', $badPart );
 +                      $warning = wfMessage( 'file-thumbnail-no', $badPart )->parse();
                } elseif ( $exists['warning'] == 'bad-prefix' ) {
 -                      $warning = wfMsgExt( 'filename-bad-prefix', 'parseinline', $exists['prefix'] );
 +                      $warning = wfMessage( 'filename-bad-prefix', $exists['prefix'] )->parse();
                } elseif ( $exists['warning'] == 'was-deleted' ) {
                        # If the file existed before and was deleted, warn the user of this
                        $ltitle = SpecialPage::getTitleFor( 'Log' );
                        $llink = Linker::linkKnown(
                                $ltitle,
 -                              wfMsgHtml( 'deletionlog' ),
 +                              wfMessage( 'deletionlog' )->escaped(),
                                array(),
                                array(
                                        'type' => 'delete',
                                        'page' => $filename
                                )
                        );
 -                      $warning = wfMsgExt( 'filewasdeleted', array( 'parse', 'replaceafter' ), $llink );
 +                      $warning = wfMessage( 'filewasdeleted' )->rawParams( $llink )->parseAsBlock();
                }
  
                return $warning;
         * @return string
         */
        public static function getDupeWarning( $dupes ) {
 -              global $wgOut;
 -              if( $dupes ) {
 -                      $msg = '<gallery>';
 -                      foreach( $dupes as $file ) {
 -                              $title = $file->getTitle();
 -                              $msg .= $title->getPrefixedText() .
 -                                      '|' . $title->getText() . "\n";
 -                      }
 -                      $msg .= '</gallery>';
 -                      return '<li>' .
 -                              wfMsgExt( 'file-exists-duplicate', array( 'parse' ), count( $dupes ) ) .
 -                              $wgOut->parse( $msg ) .
 -                              "</li>\n";
 -              } else {
 +              if ( !$dupes ) {
                        return '';
                }
 +
 +              $gallery = new ImageGallery;
 +              $gallery->setShowBytes( false );
 +              foreach( $dupes as $file ) {
 +                      $gallery->add( $file->getTitle() );
 +              }
 +              return '<li>' .
 +                      wfMessage( 'file-exists-duplicate' )->numParams( count( $dupes ) )->parse() .
 +                      $gallery->toHtml() . "</li>\n";
        }
  
  }
@@@ -766,7 -775,7 +766,7 @@@ class UploadForm extends HTMLForm 
                parent::__construct( $descriptor, $context, 'upload' );
  
                # Set some form properties
 -              $this->setSubmitText( wfMsg( 'uploadbtn' ) );
 +              $this->setSubmitText( $this->msg( 'uploadbtn' )->text() );
                $this->setSubmitName( 'wpUpload' );
                # Used message keys: 'accesskey-upload', 'tooltip-upload'
                $this->setSubmitTooltip( 'upload' );
         * @return Array: descriptor array
         */
        protected function getSourceSection() {
-               global $wgCopyUploadsFromSpecialUpload;
                if ( $this->mSessionKey ) {
                        return array(
                                'SessionKey' => array(
                        );
                }
  
-               $canUploadByUrl = UploadFromUrl::isEnabled()
-                       && UploadFromUrl::isAllowed( $this->getUser() )
-                       && $wgCopyUploadsFromSpecialUpload;
+               $canUploadByUrl = UploadFromUrl::isEnabled() && UploadFromUrl::isAllowed( $this->getUser() );
                $radio = $canUploadByUrl;
                $selectedSourceType = strtolower( $this->getRequest()->getText( 'wpSourceType', 'File' ) );
  
                        'label-message' => 'sourcefilename',
                        'upload-type' => 'File',
                        'radio' => &$radio,
 -                      'help' => wfMsgExt( 'upload-maxfilesize',
 -                                      array( 'parseinline', 'escapenoentities' ),
 +                      'help' => $this->msg( 'upload-maxfilesize',
                                        $this->getContext()->getLanguage()->formatSize( $this->mMaxUploadSize['file'] )
 -                              ) . ' ' . wfMsgHtml( 'upload_source_file' ),
 +                              )->parse() . ' ' . $this->msg( 'upload_source_file' )->escaped(),
                        'checked' => $selectedSourceType == 'file',
                );
                if ( $canUploadByUrl ) {
                                'label-message' => 'sourceurl',
                                'upload-type' => 'url',
                                'radio' => &$radio,
 -                              'help' => wfMsgExt( 'upload-maxfilesize',
 -                                              array( 'parseinline', 'escapenoentities' ),
 +                              'help' => $this->msg( 'upload-maxfilesize',
                                                $this->getContext()->getLanguage()->formatSize( $this->mMaxUploadSize['url'] )
 -                                      ) . ' ' . wfMsgHtml( 'upload_source_url' ),
 +                                      )->parse() . ' ' . $this->msg( 'upload_source_url' )->escaped(),
                                'checked' => $selectedSourceType == 'url',
                        );
                }
                                # Everything not permitted is banned
                                $extensionsList =
                                        '<div id="mw-upload-permitted">' .
 -                                      wfMsgExt( 'upload-permitted', 'parse', $this->getContext()->getLanguage()->commaList( $wgFileExtensions ) ) .
 +                                      $this->msg( 'upload-permitted', $this->getContext()->getLanguage()->commaList( $wgFileExtensions ) )->parseAsBlock() .
                                        "</div>\n";
                        } else {
                                # We have to list both preferred and prohibited
                                $extensionsList =
                                        '<div id="mw-upload-preferred">' .
 -                                      wfMsgExt( 'upload-preferred', 'parse', $this->getContext()->getLanguage()->commaList( $wgFileExtensions ) ) .
 +                                              $this->msg( 'upload-preferred', $this->getContext()->getLanguage()->commaList( $wgFileExtensions ) )->parseAsBlock() .
                                        "</div>\n" .
                                        '<div id="mw-upload-prohibited">' .
 -                                      wfMsgExt( 'upload-prohibited', 'parse', $this->getContext()->getLanguage()->commaList( $wgFileBlacklist ) ) .
 +                                              $this->msg( 'upload-prohibited', $this->getContext()->getLanguage()->commaList( $wgFileBlacklist ) )->parseAsBlock() .
                                        "</div>\n";
                        }
                } else {