Index: trunk/extensions/ConfirmAccount/SpecialConfirmAccount.php |
— | — | @@ -108,16 +108,15 @@ |
109 | 109 | return true; |
110 | 110 | } |
111 | 111 | |
112 | | -function efConfirmAccountInjectStyle( $out, $parserOut ) { |
113 | | - global $wgJsMimeType; |
| 112 | +function efConfirmAccountInjectStyle() { |
| 113 | + global $wgOut; |
114 | 114 | # UI CSS |
115 | | - $out->addLink( array( |
| 115 | + $wgOut->addLink( array( |
116 | 116 | 'rel' => 'stylesheet', |
117 | 117 | 'type' => 'text/css', |
118 | 118 | 'media' => 'screen, projection', |
119 | 119 | 'href' => CONFIRMACCOUNT_CSS, |
120 | 120 | ) ); |
121 | | - |
122 | 121 | return true; |
123 | 122 | } |
124 | 123 | |
— | — | @@ -127,8 +126,6 @@ |
128 | 127 | if( !$wgConfirmAccountNotice || !$wgUser->isAllowed('confirmaccount') ) |
129 | 128 | return true; |
130 | 129 | |
131 | | - wfLoadExtensionMessages( 'ConfirmAccount' ); |
132 | | - |
133 | 130 | $dbr = wfGetDB( DB_SLAVE ); |
134 | 131 | $count = $dbr->selectField( 'account_requests', 'COUNT(*)', |
135 | 132 | array( 'acr_deleted' => 0, 'acr_held IS NULL' ), |
— | — | @@ -136,6 +133,8 @@ |
137 | 134 | |
138 | 135 | if( !$count ) |
139 | 136 | return true; |
| 137 | + |
| 138 | + wfLoadExtensionMessages( 'ConfirmAccount' ); |
140 | 139 | |
141 | 140 | $notice .= '<div id="mw-confirmaccount-msg" class="mw-confirmaccount-bar">' . |
142 | 141 | wfMsgExt( 'confirmaccount-newrequests', array('parseinline'), $count ) . '</div>'; |
— | — | @@ -163,13 +162,12 @@ |
164 | 163 | $wgHooks['LoadExtensionSchemaUpdates'][] = 'efConfirmAccountSchemaUpdates'; |
165 | 164 | # Status header like "new messages" bar |
166 | 165 | $wgHooks['SiteNoticeAfter'][] = 'wfConfirmAccountsNotice'; |
167 | | -# CSS |
168 | | -$wgHooks['OutputPageParserOutput'][] = 'efConfirmAccountInjectStyle'; |
169 | 166 | |
170 | 167 | function efLoadConfirmAccount() { |
171 | 168 | global $wgScriptPath; |
172 | 169 | if( !defined( 'CONFIRMACCOUNT_CSS' ) ) |
173 | 170 | define('CONFIRMACCOUNT_CSS', $wgScriptPath.'/extensions/ConfirmAccount/confirmaccount.css' ); |
| 171 | + efConfirmAccountInjectStyle(); |
174 | 172 | } |
175 | 173 | |
176 | 174 | function efConfirmAccountSchemaUpdates() { |