r39667 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39666‎ | r39667 | r39668 >
Date:22:24, 19 August 2008
Author:brion
Status:old
Tags:
Comment:
Fix reversion -- r39631 was the basic broken bit, other one was just adjustments to it or something else
Modified paths:
  • /trunk/extensions/CheckUser/CheckUser.i18n.php (modified) (history)
  • /trunk/extensions/CheckUser/CheckUser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CheckUser/CheckUser.i18n.php
@@ -70,7 +70,6 @@
7171 'checkuser-log-ipusers-xff' => '$1 got users for XFF $2',
7272 'checkuser-log-useredits' => '$1 got edits for $2',
7373
74 - 'checkuser-autocreate-action' => 'was automatically created',
7574 'checkuser-email-action' => 'sent an email to user "$1"',
7675 'checkuser-reset-action' => 'reset password for user "$1"',
7776
Index: trunk/extensions/CheckUser/CheckUser.php
@@ -36,7 +36,6 @@
3737 # Recent changes data hook
3838 global $wgHooks;
3939 $wgHooks['RecentChange_save'][] = 'efUpdateCheckUserData';
40 -$wgHooks['AuthPluginAutoCreate'][] = 'efUpdateAutoCreateData';
4140 $wgHooks['EmailUser'][] = 'efUpdateCUEmailData';
4241 $wgHooks['User::mailPasswordInternal'][] = 'efUpdateCUPasswordResetData';
4342
@@ -114,48 +113,6 @@
115114 }
116115
117116 /**
118 - * Hook function to store autocreation data from the auth plugin
119 - * Saves user data into the cu_changes table
120 - */
121 -function efUpdateAutoCreateData( $user ) {
122 - wfLoadExtensionMessages( 'CheckUser' );
123 - // Get IP
124 - $ip = wfGetIP();
125 - // Get XFF header
126 - $xff = wfGetForwardedFor();
127 - list($xff_ip,$trusted) = efGetClientIPfromXFF( $xff );
128 - // Our squid XFFs can flood this up sometimes
129 - $isSquidOnly = efXFFChainIsSquid( $xff );
130 - // Get agent
131 - $agent = wfGetAgent();
132 - $dbw = wfGetDB( DB_MASTER );
133 - $cuc_id = $dbw->nextSequenceValue( 'cu_changes_cu_id_seq' );
134 - $rcRow = array(
135 - 'cuc_id' => $cuc_id,
136 - 'cuc_page_id' => 0,
137 - 'cuc_namespace' => NS_USER,
138 - 'cuc_title' => '',
139 - 'cuc_minor' => 0,
140 - 'cuc_user' => User::idFromName($user),
141 - 'cuc_user_text' => $user,
142 - 'cuc_actiontext' => wfMsgForContent('checkuser-autocreate-action'),
143 - 'cuc_comment' => '',
144 - 'cuc_this_oldid' => 0,
145 - 'cuc_last_oldid' => 0,
146 - 'cuc_type' => RC_LOG,
147 - 'cuc_timestamp' => $dbw->timestamp( wfTimestampNow() ),
148 - 'cuc_ip' => IP::sanitizeIP($ip),
149 - 'cuc_ip_hex' => $ip ? IP::toHex( $ip ) : null,
150 - 'cuc_xff' => !$isSquidOnly ? $xff : '',
151 - 'cuc_xff_hex' => ($xff_ip && !$isSquidOnly) ? IP::toHex( $xff_ip ) : null,
152 - 'cuc_agent' => $agent
153 - );
154 - $dbw->insert( 'cu_changes', $rcRow, __METHOD__ );
155 -
156 - return true;
157 -}
158 -
159 -/**
160117 * Hook function to store password reset
161118 * Saves user data into the cu_changes table
162119 */

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r39631Record plugin autocreation data in the CU logs, e.g. for SULkrimpet02:46, 19 August 2008

Status & tagging log