r106075 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106074‎ | r106075 | r106076 >
Date:20:06, 13 December 2011
Author:jeroendedauw
Status:ok (Comments)
Tags:
Comment:
fix deprecated method usage and do strict comparison
Modified paths:
  • /trunk/extensions/UploadWizard/includes/specials/SpecialUploadWizard.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/includes/specials/SpecialUploadWizard.php
@@ -186,7 +186,7 @@
187187 protected function getPageContent( $pageName, $parse = false, $langCode = null ) {
188188 $content = false;
189189
190 - if ( trim( $pageName ) != '' ) {
 190+ if ( trim( $pageName ) !== '' ) {
191191 if ( is_null( $langCode ) ) {
192192 $langCode = $this->getLanguage()->getCode();
193193 }
@@ -252,14 +252,14 @@
253253 // Custom message if logged-in users without any special rights can upload
254254 $this->getOutput()->showErrorPage( 'uploadnologin', 'uploadnologintext' );
255255 } else {
256 - $this->getOutput()->permissionRequired( 'upload' );
 256+ throw new PermissionsError( 'upload' );
257257 }
258258 return false;
259259 }
260260
261261 // Check blocks
262262 if ( $user->isBlocked() ) {
263 - $this->getOutput()->blockedPage();
 263+ throw new UserBlockedError( $this->getUser()->mBlock );
264264 return false;
265265 }
266266

Comments

#Comment by Nikerabbit (talk | contribs)   07:15, 14 December 2011

Two consecutive spaces in throw new Permission...

Status & tagging log