r91170 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91169‎ | r91170 | r91171 >
Date:14:35, 30 June 2011
Author:ialex
Status:deferred
Tags:
Comment:
User::idFromName() is static
Modified paths:
  • /trunk/extensions/Tasks/Tasks.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Tasks/Tasks.body.php
@@ -229,7 +229,7 @@
230230 $dbw = wfGetDB( DB_MASTER );
231231 $user_id = 0;
232232 if ( !is_null($name) ) {
233 - $user_id = $wgUser->idFromName($name);
 233+ $user_id = User::idFromName($name);
234234 if ( !ctype_digit($user_id) ) {
235235 $user_id = 0; # (int)0 indicates assigned to "no one"
236236 }
@@ -459,7 +459,7 @@
460460 # Unassign me; this can be invoked for every user by editing the URL!
461461 $user_id = 0;
462462 } elseif ( $mode == 'assignto' ) {
463 - $user_id = $wgUser->idFromName($name);
 463+ $user_id = User::idFromName($name);
464464 if ( empty($user_id) ) {
465465 break; # break as though "mode" were undefined (no action)
466466 }

Status & tagging log