r105163 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105162‎ | r105163 | r105164 >
Date:11:16, 5 December 2011
Author:catrope
Status:deferred
Tags:
Comment:
AFTv5: Fix schema updates hook, and remove useless ParserTestTables hook (which has the old table names from v4 -- I'm not quite sure why this code was even in v4 to begin with)
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php
@@ -146,30 +146,23 @@
147147 */
148148 public static function loadExtensionSchemaUpdates( $updater = null ) {
149149 if ( $updater === null ) {
150 - // Guess that's it for now?
151150 global $wgExtNewTables;
152151 $wgExtNewTables[] = array(
153152 'article_feedback',
154153 dirname( __FILE__ ) . '/sql/ArticleFeedbackv5.sql'
155154 );
156155 } else {
157 - # no-op, since we dobn't have upgrades yet.
 156+ $updater->addExtensionUpdate( array(
 157+ 'addTable',
 158+ 'article_feedback',
 159+ dirname( __FILE__ ) . '/sql/ArticleFeedbackv5.sql',
 160+ true
 161+ ) );
158162 }
159163 return true;
160164 }
161165
162166 /**
163 - * ParserTestTables hook
164 - */
165 - public static function parserTestTables( &$tables ) {
166 - $tables[] = 'article_feedback';
167 - $tables[] = 'article_feedback_pages';
168 - $tables[] = 'article_feedback_revisions';
169 - $tables[] = 'article_feedback_properties';
170 - return true;
171 - }
172 -
173 - /**
174167 * BeforePageDisplay hook
175168 */
176169 public static function beforePageDisplay( $out ) {

Status & tagging log