r77160 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77159‎ | r77160 | r77161 >
Date:15:38, 23 November 2010
Author:catrope
Status:deferred
Tags:
Comment:
UploadWizard: Use getTitleFor(), misc style fixes
Modified paths:
  • /trunk/extensions/UploadWizard/SpecialUploadWizard.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/SpecialUploadWizard.php
@@ -27,14 +27,14 @@
2828 // but then we'll need to process non-JS uploads in the same way Special:Upload does.
2929 $this->simpleForm = new UploadWizardSimpleForm();
3030 $this->simpleForm->setTitle(
31 - SpecialPage::getPage( 'Upload' )->getTitle()
 31+ SpecialPage::getTitleFor( 'Upload' )
3232 );
3333 }
3434
3535 /**
3636 * Replaces default execute method
3737 * Checks whether uploading enabled, user permissions okay,
38 - * @param subpage, e.g. the "foo" in Special:UploadWizard/foo.
 38+ * @param $subPage, e.g. the "foo" in Special:UploadWizard/foo.
3939 */
4040 public function execute( $subPage ) {
4141 global $wgLang, $wgUser, $wgOut, $wgExtensionAssetsPath,
@@ -42,19 +42,18 @@
4343
4444 // side effects: if we can't upload, will print error page to wgOut
4545 // and return false
46 - if (! ( $this->isUploadAllowed() && $this->isUserUploadAllowed( $wgUser ) ) ) {
 46+ if ( !( $this->isUploadAllowed() && $this->isUserUploadAllowed( $wgUser ) ) ) {
4747 return;
4848 }
4949
5050 $this->setHeaders();
5151 $this->outputHeader();
52 -
5352
5453 // fallback for non-JS
55 - $wgOut->addHTML('<noscript>');
 54+ $wgOut->addHTML( '<noscript>' );
5655 $wgOut->addHTML( '<p class="errorbox">' . wfMsg( 'mwe-upwiz-js-off' ) . '</p>' );
5756 $this->simpleForm->show();
58 - $wgOut->addHTML('</noscript>');
 57+ $wgOut->addHTML( '</noscript>' );
5958
6059
6160 // global javascript variables

Status & tagging log