r105692 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105691‎ | r105692 | r105693 >
Date:18:53, 9 December 2011
Author:aaron
Status:ok
Tags:
Comment:
Renamed some awkward function names
Modified paths:
  • /trunk/extensions/CheckUser/CheckUser.hooks.php (modified) (history)
  • /trunk/extensions/CheckUser/CheckUser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CheckUser/CheckUser.hooks.php
@@ -150,12 +150,24 @@
151151 *
152152 * @return true
153153 */
154 - public static function updateAutoCreateData( User $user ) {
 154+ public static function onAuthPluginAutoCreate( User $user ) {
155155 return self::logUserAccountCreation( $user, 'checkuser-autocreate-action' );
156156 }
157157
158158 /**
 159+ * Hook function to store registration data
 160+ * Saves user data into the cu_changes table
 161+ *
159162 * @param $user User
 163+ * @param $byEmail bool
 164+ * @return bool
 165+ */
 166+ public static function onAddNewAccount( User $user, $byEmail ) {
 167+ return self::logUserAccountCreation( $user, 'checkuser-create-action' );
 168+ }
 169+
 170+ /**
 171+ * @param $user User
160172 * @param $actiontext string
161173 * @return bool
162174 */
@@ -197,18 +209,6 @@
198210 }
199211
200212 /**
201 - * Hook function to store registration data
202 - * Saves user data into the cu_changes table
203 - *
204 - * @param $user User
205 - * @param $byEmail bool
206 - * @return bool
207 - */
208 - public static function addNewAccount( User $user, $byEmail ) {
209 - return self::logUserAccountCreation( $user, 'checkuser-create-action' );
210 - }
211 -
212 - /**
213213 * Hook function to prune data from the cu_changes table
214214 */
215215 public static function maybePruneIPData() {
Index: trunk/extensions/CheckUser/CheckUser.php
@@ -61,8 +61,8 @@
6262 $wgHooks['RecentChange_save'][] = 'CheckUserHooks::updateCheckUserData';
6363 $wgHooks['EmailUser'][] = 'CheckUserHooks::updateCUEmailData';
6464 $wgHooks['User::mailPasswordInternal'][] = 'CheckUserHooks::updateCUPasswordResetData';
65 -$wgHooks['AuthPluginAutoCreate'][] = 'CheckUserHooks::updateAutoCreateData';
66 -$wgHooks['AddNewAccount'][] = 'CheckUserHooks::addNewAccount';
 65+$wgHooks['AuthPluginAutoCreate'][] = 'CheckUserHooks::onAuthPluginAutoCreate';
 66+$wgHooks['AddNewAccount'][] = 'CheckUserHooks::onAddNewAccount';
6767
6868 # Occasional pruning of CU data
6969 $wgHooks['ArticleEditUpdatesDeleteFromRecentchanges'][] = 'CheckUserHooks::maybePruneIPData';

Status & tagging log