r98042 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98041‎ | r98042 | r98043 >
Date:23:03, 24 September 2011
Author:catrope
Status:ok (Comments)
Tags:
Comment:
Fix bug in r97998: updates are deferred, so indexExists() failed with a nonexistent table error if the MoodBar table was completely absent.
Modified paths:
  • /trunk/extensions/MoodBar/MoodBar.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/MoodBar.hooks.php
@@ -76,7 +76,9 @@
7777 );
7878
7979 $db = $updater->getDB();
80 - if ( $db->indexExists( 'moodbar_feedback', 'type_timestamp', __METHOD__ ) ) {
 80+ if ( $db->tableExists( 'moodbar_feedback' ) &&
 81+ $db->indexExists( 'moodbar_feedback', 'type_timestamp', __METHOD__ ) )
 82+ {
8183 $updater->addExtensionUpdate( array( 'addIndex', 'moodbar_feedback',
8284 'mbf_type_timestamp_id', dirname( __FILE__ ) . '/sql/AddIDToIndexes.sql', true )
8385 );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r97998MoodBar: Add mbf_id to the end of all indexes so we can do proper, indexed, s...catrope12:50, 24 September 2011

Comments

#Comment by Krinkle (talk | contribs)   23:07, 24 September 2011

Thx!

Status & tagging log