r99510 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99509‎ | r99510 | r99511 >
Date:17:52, 11 October 2011
Author:wikinaut
Status:reverted (Comments)
Tags:
Comment:
chg protected to public function addIndex and dropIndex . This is i.a. needed for schema updating in OpenID extension in conformity with contemporary updater routines, see comments on rev97447
Modified paths:
  • /trunk/phase3/includes/installer/DatabaseUpdater.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/DatabaseUpdater.php
@@ -432,7 +432,7 @@
433433 * @param $patch String Path to the patch file
434434 * @param $fullpath Boolean Whether to treat $patch path as a relative or not
435435 */
436 - protected function addIndex( $table, $index, $patch, $fullpath = false ) {
 436+ public function addIndex( $table, $index, $patch, $fullpath = false ) {
437437 if ( $this->db->indexExists( $table, $index ) ) {
438438 $this->output( "...$index key already set on $table table.\n" );
439439 } else {
@@ -468,7 +468,7 @@
469469 * @param $patch String: Path to the patch file
470470 * @param $fullpath Boolean: Whether to treat $patch path as a relative or not
471471 */
472 - protected function dropIndex( $table, $index, $patch, $fullpath = false ) {
 472+ public function dropIndex( $table, $index, $patch, $fullpath = false ) {
473473 if ( $this->db->indexExists( $table, $index ) ) {
474474 $this->output( "Dropping $index from table $table... " );
475475 $this->applyPatch( $patch, $fullpath );

Follow-up revisions

RevisionCommit summaryAuthorDate
r99511follow-up r97447 . removed redundant updater code which duplicated core logic...wikinaut18:03, 11 October 2011
r99515self-revert back to protected functions addIndex and dropIndex as suggested i...wikinaut18:17, 11 October 2011

Comments

#Comment by Wikinaut (talk | contribs)   17:53, 11 October 2011

changed and submitted as suggested by ^demon.

#Comment by Reedy (talk | contribs)   18:05, 11 October 2011

This isn't right, you shouldn't be calling these methods correctly

$updater->addExtensionUpdate( array( 'addIndex',....

Or use the new addExtensionIndex I added shortly ago

#Comment by Wikinaut (talk | contribs)   18:09, 11 October 2011

shall I revert? or you?

#Comment by Reedy (talk | contribs)   18:10, 11 October 2011

You can revert it

#Comment by Wikinaut (talk | contribs)   18:19, 11 October 2011

reverted in r99515

Status & tagging log