r99529 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99528‎ | r99529 | r99530 >
Date:18:39, 11 October 2011
Author:wikinaut
Status:deferred
Tags:
Comment:
follow-up r99511 r97447 and not using dropIndex and addIndex directly any more. Only using addExtensionUpdate( array( dropIndex/addIndex )) for mw >= 1.17
Modified paths:
  • /trunk/extensions/OpenID/OpenID.hooks.php (modified) (history)
  • /trunk/extensions/OpenID/OpenID.php (modified) (history)
  • /trunk/extensions/OpenID/README.OpenID-mediawiki-extension (modified) (history)

Diff [purge]

Index: trunk/extensions/OpenID/README.OpenID-mediawiki-extension
@@ -1,5 +1,5 @@
22 MediaWiki OpenID extension README.OpenID-mediawiki-extension file
3 -version 0.940-beta 20111011
 3+version 0.941-beta 20111011
44
55 Homepage and manual http://www.mediawiki.org/wiki/Extension:OpenID
66
Index: trunk/extensions/OpenID/OpenID.hooks.php
@@ -357,14 +357,10 @@
358358 $db = $updater->getDB();
359359 $info = $db->fieldInfo( 'user_openid', 'uoi_user' );
360360 if ( !$info->isMultipleKey() ) {
361 - echo( "Making uoi_user field non UNIQUE...\n" );
362 - $updater->dropIndex( 'user_openid', 'uoi_user',
363 - dirname( __FILE__ ) . '/patches/patch-drop_non_multiple_key_index_uoi_user.sql', true );
364 - $updater->addIndex( 'user_openid', 'user_openid_user',
365 - dirname( __FILE__ ) . '/patches/patch-add_multiple_key_index_user_openid_user.sql', true );
366 - echo( "...done.\n" );
367 - } else {
368 - echo( "...uoi_user field is already non UNIQUE.\n" );
 361+ $updater->addExtensionUpdate( array( 'dropIndex', 'user_openid', 'uoi_user',
 362+ dirname( __FILE__ ) . '/patches/patch-drop_non_multiple_key_index_uoi_user.sql', true ) );
 363+ $updater->addExtensionUpdate( array( 'addIndex', 'user_openid', 'user_openid_user',
 364+ dirname( __FILE__ ) . '/patches/patch-add_multiple_key_index_user_openid_user.sql', true ) );
369365 }
370366
371367 # uoi_user_registration field was added in OpenID version 0.937
Index: trunk/extensions/OpenID/OpenID.php
@@ -27,7 +27,7 @@
2828 exit( 1 );
2929 }
3030
31 -define( 'MEDIAWIKI_OPENID_VERSION', '0.940-beta 20111011' );
 31+define( 'MEDIAWIKI_OPENID_VERSION', '0.941-beta 20111011' );
3232
3333 $path = dirname( __FILE__ );
3434 set_include_path( implode( PATH_SEPARATOR, array( $path ) ) . PATH_SEPARATOR . get_include_path() );

Follow-up revisions

RevisionCommit summaryAuthorDate
r99652follow-up r99529 . only changes: using the Database updaters convenience wrap...wikinaut21:49, 12 October 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r97447v0.937 added uoi_user_registration timestamp when a new OpenID identity is ad...wikinaut23:55, 18 September 2011
r99511follow-up r97447 . removed redundant updater code which duplicated core logic...wikinaut18:03, 11 October 2011

Status & tagging log