r105329 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105328‎ | r105329 | r105330 >
Date:18:48, 6 December 2011
Author:preilly
Status:ok
Tags:
Comment:
remove use of empty from userlogin as it is always set
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.php
@@ -88,7 +88,7 @@
8989 }
9090
9191 class ExtMobileFrontend {
92 - const VERSION = '0.5.94';
 92+ const VERSION = '0.5.95';
9393
9494 /**
9595 * @var DOMDocument
@@ -1217,7 +1217,7 @@
12181218 if ( self::$title->isSpecial( 'Userlogin' ) && self::$isBetaGroupMember ) {
12191219 $userlogin = $this->doc->getElementById( 'userloginForm' );
12201220
1221 - if ( !empty( $userlogin ) && get_class($userlogin) === 'DOMElement' ) {
 1221+ if ( $userlogin && get_class($userlogin) === 'DOMElement' ) {
12221222 $firstHeading = $this->doc->getElementById( 'firstHeading' );
12231223 if ( !empty( $firstHeading ) ) {
12241224 $firstHeading->nodeValue = '';
@@ -1308,7 +1308,7 @@
13091309 }
13101310
13111311 if ( self::$title->isSpecial( 'Userlogin' ) && self::$isBetaGroupMember ) {
1312 - if ( !empty( $userlogin ) && get_class($userlogin) === 'DOMElement' ) {
 1312+ if ( $userlogin && get_class($userlogin) === 'DOMElement' ) {
13131313 $login = $this->renderLogin();
13141314 $loginNode = $this->doc->importNode( $login, true );
13151315 $userlogin->appendChild( $loginNode );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r104518remove unnecessary dom parsingpreilly00:21, 29 November 2011

Status & tagging log