r37424 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37423‎ | r37424 | r37425 >
Date:18:13, 9 July 2008
Author:vasilievvv
Status:old
Tags:
Comment:
* Code cleanup
* Rename messages to prevent conflicts
Modified paths:
  • /trunk/extensions/CentralAuth/CentralAuth.i18n.php (modified) (history)
  • /trunk/extensions/CentralAuth/CentralAuthHooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralAuth/CentralAuthHooks.php
@@ -276,21 +276,18 @@
277277 }
278278
279279 /**
280 - * Don't allow an attached local account to be renamed with the old system.
 280+ * Warn bureaucrat about possible conflicts with unified accounts
281281 */
282282 static function onRenameUserWarning( $oldName, $newName, &$warnings ) {
283283 $oldCentral = new CentralAuthUser( $oldName );
284284 if ( $oldCentral->exists() && $oldCentral->isAttached() ) {
285 - global $wgOut;
286285 wfLoadExtensionMessages('SpecialCentralAuth');
287 - $warnings[] = array( 'centralauth-renameuser-abort', $oldName, $newName );
288 - return false;
 286+ $warnings[] = array( 'centralauth-renameuser-merged', $oldName, $newName );
289287 }
290288 $newCentral = new CentralAuthUser( $newName );
291289 if ( $newCentral->exists() && !$newCentral->isAttached() ) {
292 - global $wgOut;
293290 wfLoadExtensionMessages('SpecialCentralAuth');
294 - $warnings[] = array( 'centralauth-renameuser-exists', $oldName, $newName );
 291+ $warnings[] = array( 'centralauth-renameuser-reserved', $oldName, $newName );
295292 }
296293 return true;
297294 }
Index: trunk/extensions/CentralAuth/CentralAuth.i18n.php
@@ -209,8 +209,8 @@
210210 'centralauth-prefs-manage' => 'Manage your global account',
211211
212212 // Interaction with Special:Renameuser
213 - 'centralauth-renameuser-abort' => "User $1 has been migrated to the unified login system. Renaming it will cause local user detached from the global one.",
214 - 'centralauth-renameuser-exists' => "User $2 is reserved for a global account.",
 213+ 'centralauth-renameuser-merged' => "User $1 has been migrated to the unified login system. Renaming it will cause local user detached from the global one.",
 214+ 'centralauth-renameuser-reserved' => "User $2 is reserved for a global account.",
215215
216216 // Other messages
217217 'centralauth-invalid-wiki' => 'No such wiki database: $1',

Status & tagging log