r56137 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56136‎ | r56137 | r56138 >
Date:14:38, 10 September 2009
Author:werdna
Status:deferred
Tags:
Comment:
(bug 19978) LiquidThreads should update with update.php
Modified paths:
  • /trunk/extensions/LiquidThreads/LiquidThreads.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/Hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/LiquidThreads.php
@@ -74,6 +74,9 @@
7575 $wgHooks['ShowSearchHitTitle'][] = 'LqtHooks::customiseSearchResultTitle';
7676 $wgHooks['SpecialSearchProfiles'][] = 'LqtHooks::customiseSearchProfiles';
7777
 78+// Updates
 79+$wgHooks['LoadExtensionSchemaUpdates'][] = 'LqtHooks::onLoadExtensionSchemaUpdates';
 80+
7881 // Rename
7982 $wgHooks['RenameUserSQL'][] = 'LqtHooks::onUserRename';
8083
Index: trunk/extensions/LiquidThreads/classes/Hooks.php
@@ -287,4 +287,32 @@
288288
289289 return true;
290290 }
 291+
 292+ public static function onLoadExtensionSchemaUpdates() {
 293+ global $wgExtNewTables, $wgExtNewFields, $wgExtPGNewFields,
 294+ $wgExtPGAlteredFields, $wgExtNewIndexes, $wgDBtype;
 295+
 296+ $dir = dirname( __FILE__ );
 297+
 298+ // DB updates
 299+ $wgExtNewTables[] = array( 'thread', "$dir/lqt.sql" );
 300+ $wgExtNewTables[] = array( 'user_message_state', "$dir/lqt.sql" );
 301+ $wgExtNewTables[] = array( 'thread_history', "$dir/schema-changes/thread_history_table.sql" );
 302+
 303+
 304+ $wgExtNewFields[] = array( "thread", "thread_article_namespace", "$dir/split-thread_article.sql" );
 305+ $wgExtNewFields[] = array( "thread", "thread_article_title", "$dir/split-thread_article.sql" );
 306+ $wgExtNewFields[] = array( "thread", "thread_ancestor", "$dir/normalise-ancestry.sql" );
 307+ $wgExtNewFields[] = array( "thread", "thread_parent", "$dir/normalise-ancestry.sql" );
 308+ $wgExtNewFields[] = array( "thread", "thread_modified", "$dir/split-timestamps.sql" );
 309+ $wgExtNewFields[] = array( "thread", "thread_created", "$dir/split-timestamps.sql" );
 310+ $wgExtNewFields[] = array( "thread", "thread_editedness", "$dir/store-editedness.sql" );
 311+ $wgExtNewFields[] = array( "thread", "thread_subject", "$dir/store_subject-author.sql" );
 312+ $wgExtNewFields[] = array( "thread", "thread_author_id", "$dir/store_subject-author.sql" );
 313+ $wgExtNewFields[] = array( "thread", "thread_author_name", "$dir/store_subject-author.sql" );
 314+
 315+ $wgExtNewIndexes[] = array( 'thread', 'thread_summary_page', '(thread_summary_page)' );
 316+
 317+ return true;
 318+ }
291319 }

Status & tagging log