r29638 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r29637‎ | r29638 | r29639 >
Date:07:13, 12 January 2008
Author:aaron
Status:old
Tags:
Comment:
Bah, put this here for now, wasn't loading on all pages
Modified paths:
  • /trunk/extensions/ConfirmAccount/SpecialConfirmAccount.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ConfirmAccount/SpecialConfirmAccount.php
@@ -108,16 +108,15 @@
109109 return true;
110110 }
111111
112 -function efConfirmAccountInjectStyle( $out, $parserOut ) {
113 - global $wgJsMimeType;
 112+function efConfirmAccountInjectStyle() {
 113+ global $wgOut;
114114 # UI CSS
115 - $out->addLink( array(
 115+ $wgOut->addLink( array(
116116 'rel' => 'stylesheet',
117117 'type' => 'text/css',
118118 'media' => 'screen, projection',
119119 'href' => CONFIRMACCOUNT_CSS,
120120 ) );
121 -
122121 return true;
123122 }
124123
@@ -127,8 +126,6 @@
128127 if( !$wgConfirmAccountNotice || !$wgUser->isAllowed('confirmaccount') )
129128 return true;
130129
131 - wfLoadExtensionMessages( 'ConfirmAccount' );
132 -
133130 $dbr = wfGetDB( DB_SLAVE );
134131 $count = $dbr->selectField( 'account_requests', 'COUNT(*)',
135132 array( 'acr_deleted' => 0, 'acr_held IS NULL' ),
@@ -136,6 +133,8 @@
137134
138135 if( !$count )
139136 return true;
 137+
 138+ wfLoadExtensionMessages( 'ConfirmAccount' );
140139
141140 $notice .= '<div id="mw-confirmaccount-msg" class="mw-confirmaccount-bar">' .
142141 wfMsgExt( 'confirmaccount-newrequests', array('parseinline'), $count ) . '</div>';
@@ -163,13 +162,12 @@
164163 $wgHooks['LoadExtensionSchemaUpdates'][] = 'efConfirmAccountSchemaUpdates';
165164 # Status header like "new messages" bar
166165 $wgHooks['SiteNoticeAfter'][] = 'wfConfirmAccountsNotice';
167 -# CSS
168 -$wgHooks['OutputPageParserOutput'][] = 'efConfirmAccountInjectStyle';
169166
170167 function efLoadConfirmAccount() {
171168 global $wgScriptPath;
172169 if( !defined( 'CONFIRMACCOUNT_CSS' ) )
173170 define('CONFIRMACCOUNT_CSS', $wgScriptPath.'/extensions/ConfirmAccount/confirmaccount.css' );
 171+ efConfirmAccountInjectStyle();
174172 }
175173
176174 function efConfirmAccountSchemaUpdates() {

Status & tagging log