r34868 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r34867‎ | r34868 | r34869 >
Date:15:38, 15 May 2008
Author:brion
Status:old
Tags:
Comment:
Kill r34826's unnecessary boolval() per yesterday's IRC discussion (thought vasilievv was going to revert himself, but guess not :D)
Modified paths:
  • /trunk/phase3/includes/Autopromote.php (modified) (history)
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -2602,7 +2602,3 @@
26032603
26042604 return md5( mt_rand( 0, 0x7fffffff ) . $salt );
26052605 }
2606 -
2607 -function boolval( $val ) {
2608 - return $val ? true : false;
2609 -}
Index: trunk/phase3/includes/Autopromote.php
@@ -87,7 +87,7 @@
8888 if( User::isValidEmailAddr( $user->getEmail() ) ) {
8989 global $wgEmailAuthentication;
9090 if( $wgEmailAuthentication ) {
91 - return boolval( $user->getEmailAuthenticationTimestamp() );
 91+ return (bool)$user->getEmailAuthenticationTimestamp();
9292 } else {
9393 return true;
9494 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r34826* Move $var ? true : false check to boolval function...vasilievvv19:12, 14 May 2008

Status & tagging log