r112086 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112085‎ | r112086 | r112087 >
Date:06:22, 22 February 2012
Author:kaldari
Status:ok
Tags:fundraising 
Comment:
moving schema updating outside of if statement (not sure why it was ever inside), putting remaining hooks in load order and adding some comments
Modified paths:
  • /trunk/extensions/CentralNotice/CentralNotice.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/CentralNotice.php
@@ -119,11 +119,18 @@
120120 global $wgCentralNoticeLoader, $wgSpecialPageGroups;
121121
122122 $dir = dirname( __FILE__ ) . '/';
123 -
 123+
 124+ // Update the database schema if necessary
 125+ $wgHooks['LoadExtensionSchemaUpdates'][] = 'efCentralNoticeSchema';
 126+
 127+ // If CentralNotice banners should be shown on this wiki, load the components we need for
 128+ // showing banners. For discussion of banner loading strategies, see
 129+ // http://wikitech.wikimedia.org/view/CentralNotice/Optimizing_banner_loading
124130 if ( $wgCentralNoticeLoader ) {
125 - $wgHooks['LoadExtensionSchemaUpdates'][] = 'efCentralNoticeSchema';
 131+ $wgHooks['MakeGlobalVariablesScript'][] = 'efCentralNoticeDefaults';
 132+ // NOTE: We might want to change efCentralNoticeLoader to use the SkinAfterBottomScripts
 133+ // hook instead of BeforePageDisplay. See bug 34572.
126134 $wgHooks['BeforePageDisplay'][] = 'efCentralNoticeLoader';
127 - $wgHooks['MakeGlobalVariablesScript'][] = 'efCentralNoticeDefaults';
128135 $wgHooks['SiteNoticeAfter'][] = 'efCentralNoticeDisplay';
129136 $wgHooks['SkinAfterBottomScripts'][] = 'efCentralNoticeGeoLoader';
130137 }

Status & tagging log