r99459 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99458‎ | r99459 | r99460 >
Date:03:46, 11 October 2011
Author:reedy
Status:resolved (Comments)
Tags:
Comment:
Extension Schema update hooks

Add start of message documentation
Modified paths:
  • /trunk/extensions/PageTriage/PageTriage.i18n.php (modified) (history)
  • /trunk/extensions/PageTriage/PageTriage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PageTriage/PageTriage.i18n.php
@@ -15,3 +15,10 @@
1616 'pagetriage-desc' => 'Facilitates reviwing and approving new articles',
1717 'pagetriage' => 'Page Triage',
1818 );
 19+
 20+/**
 21+ * Message documentation (Message documentation)
 22+ */
 23+$messages['qqq'] = array(
 24+ 'pagetriage-desc' => '{{desc}}',
 25+);
\ No newline at end of file
Index: trunk/extensions/PageTriage/PageTriage.php
@@ -26,3 +26,14 @@
2727 $wgExtensionAliasesFiles['PageTriage'] = $dir . 'PageTriage.alias.php';
2828 $wgSpecialPages['PageTriage'] = 'SpecialPageTriage';
2929 $wgSpecialPageGroups['PageTriage'] = 'changes';
 30+
 31+$wgHooks['LoadExtensionSchemaUpdates'][] = 'efPageTriageSchemaUpdates';
 32+
 33+/**
 34+ * @param $updater DatabaseUpdater
 35+ * @return bool
 36+ */
 37+function efPageTriageSchemaUpdates( $updater ) {
 38+ $base = dirname( __FILE__ ) . "/sql";
 39+ $updater->addExtensionTable( 'pagetriage', "$base/PageTriage.sql" );
 40+}
\ No newline at end of file

Follow-up revisions

RevisionCommit summaryAuthorDate
r99492Return true is helpful for r99459reedy16:39, 11 October 2011

Comments

#Comment by Nikerabbit (talk | contribs)   14:38, 11 October 2011

Yay for message documentation :) Your hook doesn't actually return a boolean.

Status & tagging log