r104999 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104998‎ | r104999 | r105000 >
Date:20:39, 2 December 2011
Author:krinkle
Status:ok
Tags:
Comment:
[CentralNotice] Add function comments.
* This mess should eventually be upgraded to todays standards (no global functions but in a hooks class with static methods), but for now keeping that as is. Atleast make note of what is implementing what hook (since the function names don't help in that).
Modified paths:
  • /trunk/extensions/CentralNotice/CentralNotice.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/CentralNotice.php
@@ -94,11 +94,17 @@
9595 'scripts' => 'bannerstats.js',
9696 );
9797
 98+/**
 99+ * UnitTestsList hook handler
 100+ */
98101 function efCentralNoticeUnitTests( &$files ) {
99102 $files[] = dirname( __FILE__ ) . '/tests/CentralNoticeTest.php';
100103 return true;
101104 }
102105
 106+/**
 107+ * Called through wgExtensionFunctions
 108+ */
103109 function efCentralNoticeSetup() {
104110 global $wgHooks, $wgNoticeInfrastructure, $wgAutoloadClasses, $wgSpecialPages;
105111 global $wgCentralNoticeLoader, $wgSpecialPageGroups;
@@ -151,6 +157,9 @@
152158 }
153159 }
154160
 161+/**
 162+ * LoadExtensionSchemaUpdates hook handler
 163+ */
155164 function efCentralNoticeSchema( $updater = null ) {
156165 $base = dirname( __FILE__ );
157166 if ( $updater === null ) {
@@ -205,6 +214,9 @@
206215 return true;
207216 }
208217
 218+/**
 219+ * BeforePageDisplay hook handler
 220+ */
209221 function efCentralNoticeLoader( $out, $skin ) {
210222 global $wgOut;
211223
@@ -217,12 +229,19 @@
218230 return true;
219231 }
220232
 233+/**
 234+ * SkinAfterBottomScripts hook handler
 235+ */
221236 function efCentralNoticeGeoLoader( $skin, &$text ) {
222237 // Insert the geo IP lookup
223238 $text .= Html::linkedScript( "//geoiplookup.wikimedia.org/" );
224239 return true;
225240 }
226241
 242+
 243+/**
 244+ * MakeGlobalVariablesScript hook handler
 245+ */
227246 function efCentralNoticeDefaults( &$vars ) {
228247 global $wgNoticeProject;
229248 // Initialize global Javascript variables. We initialize Geo with empty values so if the geo
@@ -235,6 +254,9 @@
236255 return true;
237256 }
238257
 258+/**
 259+ * SiteNoticeAfter hook handler
 260+ */
239261 function efCentralNoticeDisplay( &$notice ) {
240262 // setup siteNotice div
241263 $notice =

Follow-up revisions

RevisionCommit summaryAuthorDate
r107015MFT r103297, r104003, r104210, r104999, r105015, r105740, r105800, r106166, r...awjrichards23:56, 21 December 2011

Status & tagging log