From: Aaron Schulz Date: Fri, 30 Sep 2011 17:31:36 +0000 (+0000) Subject: Made addNewUserLogEntry() return the ID of the new log entry to be more useful X-Git-Tag: 1.31.0-rc.0~27343 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=71c25a126d15a53d2f6155eb017ed4db953c50ed;p=lhc%2Fweb%2Fwiklou.git Made addNewUserLogEntry() return the ID of the new log entry to be more useful --- diff --git a/includes/User.php b/includes/User.php index b96128558b..ef724c4d2d 100644 --- a/includes/User.php +++ b/includes/User.php @@ -3913,7 +3913,7 @@ class User { * @param $byEmail Boolean: account made by email? * @param $reason String: user supplied reason * - * @return true + * @return int|bool True if not $wgNewUserLog; otherwise ID of log item or 0 on failure */ public function addNewUserLogEntry( $byEmail = false, $reason = '' ) { global $wgUser, $wgContLang, $wgNewUserLog; @@ -3935,13 +3935,12 @@ class User { } } $log = new LogPage( 'newusers' ); - $log->addEntry( + return (int)$log->addEntry( $action, $this->getUserPage(), $reason, array( $this->getId() ) ); - return true; } /**