Index: branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialBannerAllocation.php |
— | — | @@ -128,12 +128,8 @@ |
129 | 129 | * Show a list of banners with allocation. Newer banners are shown first. |
130 | 130 | */ |
131 | 131 | function showList() { |
132 | | - global $wgOut, $wgUser, $wgRequest, $wgLang; |
| 132 | + global $wgOut, $wgRequest; |
133 | 133 | |
134 | | - $sk = $wgUser->getSkin(); |
135 | | - $viewBanner = $this->getTitleFor( 'NoticeTemplate', 'view' ); |
136 | | - $viewCampaign = $this->getTitleFor( 'CentralNotice' ); |
137 | | - |
138 | 134 | // Begin building HTML |
139 | 135 | $htmlOut = ''; |
140 | 136 | |
— | — | @@ -156,38 +152,27 @@ |
157 | 153 | |
158 | 154 | $bannerList = $bannerLister->getJsonList(); |
159 | 155 | $banners = FormatJson::decode( $bannerList, true ); |
160 | | - $totalWeight = 0; |
161 | | - foreach ( $banners as $banner ) { |
162 | | - $totalWeight += $banner['weight']; |
163 | | - } |
| 156 | + $anonBanners = array(); |
| 157 | + $accountBanners = array(); |
| 158 | + $anonWeight = 0; |
| 159 | + $accountWeight = 0; |
164 | 160 | if ( $banners ) { |
165 | | - $htmlOut .= Xml::openElement( 'table', |
166 | | - array ( 'cellpadding' => 9, 'class' => 'wikitable sortable' ) ); |
167 | | - $htmlOut .= Xml::openElement( 'tr' ); |
168 | | - $htmlOut .= Xml::element( 'th', array( 'width' => '20%' ), |
169 | | - wfMsg ( 'centralnotice-percentage' ) ); |
170 | | - $htmlOut .= Xml::element( 'th', array( 'width' => '30%' ), |
171 | | - wfMsg ( 'centralnotice-banner' ) ); |
172 | | - $htmlOut .= Xml::element( 'th', array( 'width' => '30%' ), |
173 | | - wfMsg ( 'centralnotice-notice' ) ); |
174 | | - $htmlOut .= Xml::closeElement( 'tr' ); |
175 | 161 | foreach ( $banners as $banner ) { |
176 | | - $htmlOut .= Xml::openElement( 'tr' ); |
177 | | - $htmlOut .= Xml::openElement( 'td' ); |
178 | | - $percentage = ( $banner['weight'] / $totalWeight ) * 100; |
179 | | - $htmlOut .= wfMsg ( 'percent', $wgLang->formatNum( $percentage ) ); |
180 | | - $htmlOut .= Xml::closeElement( 'td' ); |
181 | | - $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ), |
182 | | - $sk->makeLinkObj( $viewBanner, htmlspecialchars( $banner['name'] ), |
183 | | - 'template=' . urlencode( $banner['name'] ) ) |
184 | | - ); |
185 | | - $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ), |
186 | | - $sk->makeLinkObj( $viewCampaign, htmlspecialchars( $banner['campaign'] ), |
187 | | - 'method=listNoticeDetail¬ice=' . urlencode( $banner['campaign'] ) ) |
188 | | - ); |
189 | | - $htmlOut .= Xml::closeElement( 'tr' ); |
| 162 | + if ($banner['display_anon']) { |
| 163 | + $anonBanners[] = $banner; |
| 164 | + $anonWeight += $banner['weight']; |
| 165 | + } |
| 166 | + if ($banner['display_account']) { |
| 167 | + $accountBanners[] = $banner; |
| 168 | + $accountWeight += $banner['weight']; |
| 169 | + } |
190 | 170 | } |
191 | | - $htmlOut .= Xml::closeElement( 'table' ); |
| 171 | + if ( $anonBanners ) { |
| 172 | + $htmlOut .= $this->getTable( wfMsg ( 'centralnotice-banner-anonymous' ), $anonBanners, $anonWeight ); |
| 173 | + } |
| 174 | + if ( $accountBanners ) { |
| 175 | + $htmlOut .= $this->getTable( wfMsg ( 'centralnotice-banner-logged-in' ), $accountBanners, $accountWeight ); |
| 176 | + } |
192 | 177 | } else { |
193 | 178 | $htmlOut .= Xml::tags( 'p', null, wfMsg ( 'centralnotice-no-allocation' ) ); |
194 | 179 | } |
— | — | @@ -197,5 +182,44 @@ |
198 | 183 | |
199 | 184 | $wgOut->addHTML( $htmlOut ); |
200 | 185 | } |
| 186 | + |
| 187 | + function getTable( $type, $banners, $weight ) { |
| 188 | + global $wgUser, $wgLang; |
| 189 | + |
| 190 | + $sk = $wgUser->getSkin(); |
| 191 | + $viewBanner = $this->getTitleFor( 'NoticeTemplate', 'view' ); |
| 192 | + $viewCampaign = $this->getTitleFor( 'CentralNotice' ); |
| 193 | + |
| 194 | + $htmlOut = Xml::openElement( 'table', |
| 195 | + array ( 'cellpadding' => 9, 'class' => 'wikitable sortable', 'style' => 'margin: 1em;' ) |
| 196 | + ); |
| 197 | + $htmlOut .= Xml::element( 'caption', array( 'style' => 'font-size: 1.2em;' ), $type ); |
| 198 | + $htmlOut .= Xml::openElement( 'tr' ); |
| 199 | + $htmlOut .= Xml::element( 'th', array( 'width' => '20%' ), |
| 200 | + wfMsg ( 'centralnotice-percentage' ) ); |
| 201 | + $htmlOut .= Xml::element( 'th', array( 'width' => '30%' ), |
| 202 | + wfMsg ( 'centralnotice-banner' ) ); |
| 203 | + $htmlOut .= Xml::element( 'th', array( 'width' => '30%' ), |
| 204 | + wfMsg ( 'centralnotice-notice' ) ); |
| 205 | + $htmlOut .= Xml::closeElement( 'tr' ); |
| 206 | + foreach ( $banners as $banner ) { |
| 207 | + $htmlOut .= Xml::openElement( 'tr' ); |
| 208 | + $htmlOut .= Xml::openElement( 'td' ); |
| 209 | + $percentage = round( ( $banner['weight'] / $weight ) * 100, 2 ); |
| 210 | + $htmlOut .= wfMsg ( 'percent', $wgLang->formatNum( $percentage ) ); |
| 211 | + $htmlOut .= Xml::closeElement( 'td' ); |
| 212 | + $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ), |
| 213 | + $sk->makeLinkObj( $viewBanner, htmlspecialchars( $banner['name'] ), |
| 214 | + 'template=' . urlencode( $banner['name'] ) ) |
| 215 | + ); |
| 216 | + $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ), |
| 217 | + $sk->makeLinkObj( $viewCampaign, htmlspecialchars( $banner['campaign'] ), |
| 218 | + 'method=listNoticeDetail¬ice=' . urlencode( $banner['campaign'] ) ) |
| 219 | + ); |
| 220 | + $htmlOut .= Xml::closeElement( 'tr' ); |
| 221 | + } |
| 222 | + $htmlOut .= Xml::closeElement( 'table' ); |
| 223 | + return $htmlOut; |
| 224 | + } |
201 | 225 | |
202 | 226 | } |
Property changes on: branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialBannerAllocation.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
203 | 227 | Merged /trunk/phase3/extensions/CentralNotice/special/SpecialBannerAllocation.php:r63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816,77555,77558-77560,77563-77565,77573 |
204 | 228 | Merged /branches/wmf-deployment/extensions/CentralNotice/special/SpecialBannerAllocation.php:r60970 |
205 | 229 | Merged /branches/wmf/1.16wmf4/extensions/CentralNotice/special/SpecialBannerAllocation.php:r67177,69199,76243,77266 |
206 | 230 | Merged /trunk/extensions/CentralNotice/special/SpecialBannerAllocation.php:r62820-67552,67557,67559-71720,71725-71731,71734-71739,71748-71753,71774-71997,72058-72131,72136-73830,73847,73850,73852,73855,73959,73963,73973,73980,73983,73991,73994-73995,74000-74321,74325-74406,75376-75470,75567,75643,75646,75674,75680,75726,75849,75889,75908,75973,76141,76145,76333,76347,76351,76356-76358,76361,76363,76462,76543,76763,77622-79761,79780,79783-80145,80147-80148,80150,80152-80602,81461-83563,83565-95513 |
Index: branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialNoticeTemplate.php |
— | — | @@ -47,7 +47,7 @@ |
48 | 48 | CentralNotice::printHeader(); |
49 | 49 | |
50 | 50 | // Begin Banners tab content |
51 | | - $wgOut->addHTML( Xml::openElement( 'div', array( 'id' => 'preferences' ) ) ); |
| 51 | + $wgOut->addHTML( Html::openElement( 'div', array( 'id' => 'preferences' ) ) ); |
52 | 52 | |
53 | 53 | $method = $wgRequest->getVal( 'wpMethod' ); |
54 | 54 | |
— | — | @@ -121,14 +121,14 @@ |
122 | 122 | if ( $sub == 'view' && $wgRequest->getVal( 'wpUserLanguage' ) == 'all' ) { |
123 | 123 | $template = $wgRequest->getVal( 'template' ); |
124 | 124 | $this->showViewAvailable( $template ); |
125 | | - $wgOut->addHTML( Xml::closeElement( 'div' ) ); |
| 125 | + $wgOut->addHTML( Html::closeElement( 'div' ) ); |
126 | 126 | return; |
127 | 127 | } |
128 | 128 | |
129 | 129 | // Handle viewing a specific banner |
130 | 130 | if ( $sub == 'view' && $wgRequest->getText( 'template' ) != '' ) { |
131 | 131 | $this->showView(); |
132 | | - $wgOut->addHTML( Xml::closeElement( 'div' ) ); |
| 132 | + $wgOut->addHTML( Html::closeElement( 'div' ) ); |
133 | 133 | return; |
134 | 134 | } |
135 | 135 | |
— | — | @@ -136,7 +136,7 @@ |
137 | 137 | // Handle showing "Add a banner" interface |
138 | 138 | if ( $sub == 'add' ) { |
139 | 139 | $this->showAdd(); |
140 | | - $wgOut->addHTML( Xml::closeElement( 'div' ) ); |
| 140 | + $wgOut->addHTML( Html::closeElement( 'div' ) ); |
141 | 141 | return; |
142 | 142 | } |
143 | 143 | |
— | — | @@ -166,7 +166,7 @@ |
167 | 167 | $this->showList(); |
168 | 168 | |
169 | 169 | // End Banners tab content |
170 | | - $wgOut->addHTML( Xml::closeElement( 'div' ) ); |
| 170 | + $wgOut->addHTML( Html::closeElement( 'div' ) ); |
171 | 171 | } |
172 | 172 | |
173 | 173 | /** |
— | — | @@ -182,15 +182,15 @@ |
183 | 183 | $htmlOut = ''; |
184 | 184 | |
185 | 185 | // Begin Manage Banners fieldset |
186 | | - $htmlOut .= Xml::openElement( 'fieldset', array( 'class' => 'prefsection' ) ); |
| 186 | + $htmlOut .= Html::openElement( 'fieldset', array( 'class' => 'prefsection' ) ); |
187 | 187 | |
188 | 188 | if ( !$pager->getNumRows() ) { |
189 | | - $htmlOut .= Xml::element( 'p', null, wfMsg( 'centralnotice-no-templates' ) ); |
| 189 | + $htmlOut .= Html::element( 'p', null, wfMsg( 'centralnotice-no-templates' ) ); |
190 | 190 | } else { |
191 | 191 | if ( $this->editable ) { |
192 | | - $htmlOut .= Xml::openElement( 'form', array( 'method' => 'post' ) ); |
| 192 | + $htmlOut .= Html::openElement( 'form', array( 'method' => 'post' ) ); |
193 | 193 | } |
194 | | - $htmlOut .= Xml::element( 'h2', null, wfMsg( 'centralnotice-manage-templates' ) ); |
| 194 | + $htmlOut .= Html::element( 'h2', null, wfMsg( 'centralnotice-manage-templates' ) ); |
195 | 195 | |
196 | 196 | // Show paginated list of banners |
197 | 197 | $htmlOut .= Xml::tags( 'div', array( 'class' => 'cn-pager' ), |
— | — | @@ -200,18 +200,18 @@ |
201 | 201 | $pager->getNavigationBar() ); |
202 | 202 | |
203 | 203 | if ( $this->editable ) { |
204 | | - $htmlOut .= Xml::closeElement( 'form' ); |
| 204 | + $htmlOut .= Html::closeElement( 'form' ); |
205 | 205 | } |
206 | 206 | } |
207 | 207 | |
208 | 208 | if ( $this->editable ) { |
209 | | - $htmlOut .= Xml::element( 'p' ); |
| 209 | + $htmlOut .= Html::element( 'p' ); |
210 | 210 | $newPage = $this->getTitle( 'add' ); |
211 | 211 | $htmlOut .= $sk->makeLinkObj( $newPage, wfMsgHtml( 'centralnotice-add-template' ) ); |
212 | 212 | } |
213 | 213 | |
214 | 214 | // End Manage Banners fieldset |
215 | | - $htmlOut .= Xml::closeElement( 'fieldset' ); |
| 215 | + $htmlOut .= Html::closeElement( 'fieldset' ); |
216 | 216 | |
217 | 217 | $wgOut->addHTML( $htmlOut ); |
218 | 218 | } |
— | — | @@ -226,10 +226,10 @@ |
227 | 227 | |
228 | 228 | // Build HTML |
229 | 229 | $htmlOut = ''; |
230 | | - $htmlOut .= Xml::openElement( 'fieldset', array( 'class' => 'prefsection' ) ); |
231 | | - $htmlOut .= Xml::openElement( 'form', |
| 230 | + $htmlOut .= Html::openElement( 'fieldset', array( 'class' => 'prefsection' ) ); |
| 231 | + $htmlOut .= Html::openElement( 'form', |
232 | 232 | array( 'method' => 'post', 'onsubmit' => 'return validateBannerForm(this)' ) ); |
233 | | - $htmlOut .= Xml::element( 'h2', null, wfMsg( 'centralnotice-add-template' ) ); |
| 233 | + $htmlOut .= Html::element( 'h2', null, wfMsg( 'centralnotice-add-template' ) ); |
234 | 234 | $htmlOut .= Html::hidden( 'wpMethod', 'addTemplate' ); |
235 | 235 | |
236 | 236 | // If there was an error, we'll need to restore the state of the form |
— | — | @@ -257,22 +257,22 @@ |
258 | 258 | ); |
259 | 259 | |
260 | 260 | // Display settings |
261 | | - $htmlOut .= Xml::openElement( 'p', null ); |
| 261 | + $htmlOut .= Html::openElement( 'p', null ); |
262 | 262 | $htmlOut .= wfMsg( 'centralnotice-banner-display' ); |
263 | 263 | $htmlOut .= Xml::check( 'displayAnon', $displayAnon, array( 'id' => 'displayAnon' ) ); |
264 | 264 | $htmlOut .= Xml::label( wfMsg( 'centralnotice-banner-anonymous' ), 'displayAnon' ); |
265 | 265 | $htmlOut .= Xml::check( 'displayAccount', $displayAccount, |
266 | 266 | array( 'id' => 'displayAccount' ) ); |
267 | 267 | $htmlOut .= Xml::label( wfMsg( 'centralnotice-banner-logged-in' ), 'displayAccount' ); |
268 | | - $htmlOut .= Xml::closeElement( 'p' ); |
| 268 | + $htmlOut .= Html::closeElement( 'p' ); |
269 | 269 | |
270 | 270 | // Fundraising settings |
271 | 271 | if ( $wgNoticeEnableFundraising ) { |
272 | | - $htmlOut .= Xml::openElement( 'p', null ); |
| 272 | + $htmlOut .= Html::openElement( 'p', null ); |
273 | 273 | $htmlOut .= Xml::check( 'fundraising', $fundraising, array( 'id' => 'fundraising' ) ); |
274 | 274 | $htmlOut .= Xml::label( wfMsg( 'centralnotice-banner-fundraising' ), 'fundraising' ); |
275 | | - $htmlOut .= Xml::closeElement( 'p' ); |
276 | | - $htmlOut .= Xml::openElement( 'div', |
| 275 | + $htmlOut .= Html::closeElement( 'p' ); |
| 276 | + $htmlOut .= Html::openElement( 'div', |
277 | 277 | array( 'id' => 'fundraisingInterface', 'style' => 'display: none;' ) ); |
278 | 278 | $htmlOut .= Xml::tags( 'p', array(), wfMsg( 'centralnotice-banner-fundraising-help' ) ); |
279 | 279 | $htmlOut .= Xml::tags( 'p', array(), |
— | — | @@ -282,7 +282,7 @@ |
283 | 283 | array( 'maxlength' => 255 ) |
284 | 284 | ) |
285 | 285 | ); |
286 | | - $htmlOut .= Xml::closeElement( 'div' ); |
| 286 | + $htmlOut .= Html::closeElement( 'div' ); |
287 | 287 | } |
288 | 288 | |
289 | 289 | // Begin banner body section |
— | — | @@ -298,7 +298,7 @@ |
299 | 299 | ); |
300 | 300 | |
301 | 301 | $htmlOut .= Xml::textarea( 'templateBody', $body, 60, 20 ); |
302 | | - $htmlOut .= Xml::closeElement( 'fieldset' ); |
| 302 | + $htmlOut .= Html::closeElement( 'fieldset' ); |
303 | 303 | $htmlOut .= Html::hidden( 'authtoken', $wgUser->editToken() ); |
304 | 304 | |
305 | 305 | // Submit button |
— | — | @@ -307,8 +307,8 @@ |
308 | 308 | Xml::submitButton( wfMsg( 'centralnotice-save-banner' ) ) |
309 | 309 | ); |
310 | 310 | |
311 | | - $htmlOut .= Xml::closeElement( 'form' ); |
312 | | - $htmlOut .= Xml::closeElement( 'fieldset' ); |
| 311 | + $htmlOut .= Html::closeElement( 'form' ); |
| 312 | + $htmlOut .= Html::closeElement( 'fieldset' ); |
313 | 313 | |
314 | 314 | // Output HTML |
315 | 315 | $wgOut->addHTML( $htmlOut ); |
— | — | @@ -338,20 +338,9 @@ |
339 | 339 | // Get current banner |
340 | 340 | $currentTemplate = $wgRequest->getText( 'template' ); |
341 | 341 | |
342 | | - // Pull banner settings from database |
343 | | - $dbr = wfGetDB( DB_SLAVE ); |
344 | | - $row = $dbr->selectRow( 'cn_templates', |
345 | | - array( |
346 | | - 'tmp_display_anon', |
347 | | - 'tmp_display_account', |
348 | | - 'tmp_fundraising', |
349 | | - 'tmp_landing_pages' |
350 | | - ), |
351 | | - array( 'tmp_name' => $currentTemplate ), |
352 | | - __METHOD__ |
353 | | - ); |
| 342 | + $bannerSettings = CentralNoticeDB::getBannerSettings( $currentTemplate ); |
354 | 343 | |
355 | | - if ( !$row ) { |
| 344 | + if ( !$bannerSettings ) { |
356 | 345 | $this->showError( 'centralnotice-banner-doesnt-exist' ); |
357 | 346 | return; |
358 | 347 | } else { |
— | — | @@ -359,9 +348,9 @@ |
360 | 349 | $htmlOut = ''; |
361 | 350 | |
362 | 351 | // Begin View Banner fieldset |
363 | | - $htmlOut .= Xml::openElement( 'fieldset', array( 'class' => 'prefsection' ) ); |
| 352 | + $htmlOut .= Html::openElement( 'fieldset', array( 'class' => 'prefsection' ) ); |
364 | 353 | |
365 | | - $htmlOut .= Xml::element( 'h2', null, |
| 354 | + $htmlOut .= Html::element( 'h2', null, |
366 | 355 | wfMsg( 'centralnotice-banner-heading', $currentTemplate ) ); |
367 | 356 | |
368 | 357 | // Show preview of banner |
— | — | @@ -398,14 +387,14 @@ |
399 | 388 | // If there are any message fields in the banner, display translation tools. |
400 | 389 | if ( count( $fields[0] ) > 0 ) { |
401 | 390 | if ( $this->editable ) { |
402 | | - $htmlOut .= Xml::openElement( 'form', array( 'method' => 'post' ) ); |
| 391 | + $htmlOut .= Html::openElement( 'form', array( 'method' => 'post' ) ); |
403 | 392 | } |
404 | 393 | $htmlOut .= Xml::fieldset( |
405 | 394 | wfMsg( 'centralnotice-translate-heading', $currentTemplate ), |
406 | 395 | false, |
407 | 396 | array( 'id' => 'mw-centralnotice-translations-for' ) |
408 | 397 | ); |
409 | | - $htmlOut .= Xml::openElement( 'table', |
| 398 | + $htmlOut .= Html::openElement( 'table', |
410 | 399 | array ( |
411 | 400 | 'cellpadding' => 9, |
412 | 401 | 'width' => '100%' |
— | — | @@ -413,14 +402,14 @@ |
414 | 403 | ); |
415 | 404 | |
416 | 405 | // Table headers |
417 | | - $htmlOut .= Xml::element( 'th', array( 'width' => '15%' ), |
| 406 | + $htmlOut .= Html::element( 'th', array( 'width' => '15%' ), |
418 | 407 | wfMsg( 'centralnotice-message' ) ); |
419 | | - $htmlOut .= Xml::element( 'th', array( 'width' => '5%' ), |
| 408 | + $htmlOut .= Html::element( 'th', array( 'width' => '5%' ), |
420 | 409 | wfMsg ( 'centralnotice-number-uses' ) ); |
421 | | - $htmlOut .= Xml::element( 'th', array( 'width' => '40%' ), |
| 410 | + $htmlOut .= Html::element( 'th', array( 'width' => '40%' ), |
422 | 411 | wfMsg ( 'centralnotice-english' ) ); |
423 | 412 | $languages = Language::getLanguageNames(); |
424 | | - $htmlOut .= Xml::element( 'th', array( 'width' => '40%' ), |
| 413 | + $htmlOut .= Html::element( 'th', array( 'width' => '40%' ), |
425 | 414 | $languages[$wpUserLang] ); |
426 | 415 | |
427 | 416 | // Remove duplicate message fields |
— | — | @@ -438,14 +427,14 @@ |
439 | 428 | : "Centralnotice-{$currentTemplate}-{$field}/{$wpUserLang}"; |
440 | 429 | |
441 | 430 | // English value |
442 | | - $htmlOut .= Xml::openElement( 'tr' ); |
| 431 | + $htmlOut .= Html::openElement( 'tr' ); |
443 | 432 | |
444 | 433 | $title = Title::newFromText( "MediaWiki:{$message}" ); |
445 | 434 | $htmlOut .= Xml::tags( 'td', null, |
446 | 435 | $sk->makeLinkObj( $title, htmlspecialchars( $field ) ) |
447 | 436 | ); |
448 | 437 | |
449 | | - $htmlOut .= Xml::element( 'td', null, $count ); |
| 438 | + $htmlOut .= Html::element( 'td', null, $count ); |
450 | 439 | |
451 | 440 | // English text |
452 | 441 | $englishText = wfMsg( 'centralnotice-message-not-set' ); |
— | — | @@ -461,7 +450,7 @@ |
462 | 451 | $englishTextExists = true; |
463 | 452 | } |
464 | 453 | $htmlOut .= Xml::tags( 'td', null, |
465 | | - Xml::element( 'span', |
| 454 | + Html::element( 'span', |
466 | 455 | array( |
467 | 456 | 'style' => 'font-style:italic;' . |
468 | 457 | ( !$englishTextExists ? 'color:silver' : '' ) |
— | — | @@ -489,9 +478,9 @@ |
490 | 479 | ( !$foreignTextExists ? 'color:red' : '' ) ) ) |
491 | 480 | ) |
492 | 481 | ); |
493 | | - $htmlOut .= Xml::closeElement( 'tr' ); |
| 482 | + $htmlOut .= Html::closeElement( 'tr' ); |
494 | 483 | } |
495 | | - $htmlOut .= Xml::closeElement( 'table' ); |
| 484 | + $htmlOut .= Html::closeElement( 'table' ); |
496 | 485 | |
497 | 486 | if ( $this->editable ) { |
498 | 487 | $htmlOut .= Html::hidden( 'wpUserLanguage', $wpUserLang ); |
— | — | @@ -505,16 +494,19 @@ |
506 | 495 | ); |
507 | 496 | } |
508 | 497 | |
509 | | - $htmlOut .= Xml::closeElement( 'fieldset' ); |
| 498 | + $htmlOut .= Html::closeElement( 'fieldset' ); |
510 | 499 | |
511 | 500 | if ( $this->editable ) { |
512 | | - $htmlOut .= Xml::closeElement( 'form' ); |
| 501 | + $htmlOut .= Html::closeElement( 'form' ); |
513 | 502 | } |
514 | 503 | |
515 | 504 | // Show language selection form |
516 | | - $htmlOut .= Xml::openElement( 'form', array( 'method' => 'post' ) ); |
| 505 | + $actionTitle = $this->getTitleFor( 'NoticeTemplate', 'view' ); |
| 506 | + $actionUrl = $actionTitle->getLocalURL(); |
| 507 | + $htmlOut .= Html::openElement( 'form', array( 'method' => 'get', 'action' => $actionUrl ) ); |
517 | 508 | $htmlOut .= Xml::fieldset( wfMsg( 'centralnotice-change-lang' ) ); |
518 | | - $htmlOut .= Xml::openElement( 'table', array ( 'cellpadding' => 9 ) ); |
| 509 | + $htmlOut .= Html::hidden( 'template', $currentTemplate ); |
| 510 | + $htmlOut .= Html::openElement( 'table', array ( 'cellpadding' => 9 ) ); |
519 | 511 | list( $lsLabel, $lsSelect ) = Xml::languageSelector( $wpUserLang ); |
520 | 512 | |
521 | 513 | $newPage = $this->getTitle( 'view' ); |
— | — | @@ -535,15 +527,14 @@ |
536 | 528 | "template=$currentTemplate&wpUserLanguage=all" ) |
537 | 529 | ) |
538 | 530 | ); |
539 | | - $htmlOut .= Xml::closeElement( 'table' ); |
540 | | - $htmlOut .= Html::hidden( 'authtoken', $wgUser->editToken() ); |
541 | | - $htmlOut .= Xml::closeElement( 'fieldset' ); |
542 | | - $htmlOut .= Xml::closeElement( 'form' ); |
| 531 | + $htmlOut .= Html::closeElement( 'table' ); |
| 532 | + $htmlOut .= Html::closeElement( 'fieldset' ); |
| 533 | + $htmlOut .= Html::closeElement( 'form' ); |
543 | 534 | } |
544 | 535 | |
545 | 536 | // Show edit form |
546 | 537 | if ( $this->editable ) { |
547 | | - $htmlOut .= Xml::openElement( 'form', |
| 538 | + $htmlOut .= Html::openElement( 'form', |
548 | 539 | array( |
549 | 540 | 'method' => 'post', |
550 | 541 | 'onsubmit' => 'return validateBannerForm(this)' |
— | — | @@ -560,16 +551,16 @@ |
561 | 552 | $landingPages = $wgRequest->getVal( 'landingPages' ); |
562 | 553 | $body = $wgRequest->getVal( 'templateBody', $body ); |
563 | 554 | } else { // Use previously stored values |
564 | | - $displayAnon = ( $row->tmp_display_anon == 1 ); |
565 | | - $displayAccount = ( $row->tmp_display_account == 1 ); |
566 | | - $fundraising = ( $row->tmp_fundraising == 1 ); |
567 | | - $landingPages = $row->tmp_landing_pages; |
| 555 | + $displayAnon = ( $bannerSettings['anon'] == 1 ); |
| 556 | + $displayAccount = ( $bannerSettings['account'] == 1 ); |
| 557 | + $fundraising = ( $bannerSettings['fundraising'] == 1 ); |
| 558 | + $landingPages = $bannerSettings['landingpages']; |
568 | 559 | // $body default is defined prior to message interface code |
569 | 560 | } |
570 | 561 | |
571 | 562 | // Show banner settings |
572 | 563 | $htmlOut .= Xml::fieldset( wfMsg( 'centralnotice-settings' ) ); |
573 | | - $htmlOut .= Xml::openElement( 'p', null ); |
| 564 | + $htmlOut .= Html::openElement( 'p', null ); |
574 | 565 | $htmlOut .= wfMsg( 'centralnotice-banner-display' ); |
575 | 566 | $htmlOut .= Xml::check( 'displayAnon', $displayAnon, |
576 | 567 | wfArrayMerge( $disabled, array( 'id' => 'displayAnon' ) ) ); |
— | — | @@ -577,20 +568,20 @@ |
578 | 569 | $htmlOut .= Xml::check( 'displayAccount', $displayAccount, |
579 | 570 | wfArrayMerge( $disabled, array( 'id' => 'displayAccount' ) ) ); |
580 | 571 | $htmlOut .= Xml::label( wfMsg( 'centralnotice-banner-logged-in' ), 'displayAccount' ); |
581 | | - $htmlOut .= Xml::closeElement( 'p' ); |
| 572 | + $htmlOut .= Html::closeElement( 'p' ); |
582 | 573 | |
583 | 574 | // Fundraising settings |
584 | 575 | if ( $wgNoticeEnableFundraising ) { |
585 | | - $htmlOut .= Xml::openElement( 'p', null ); |
| 576 | + $htmlOut .= Html::openElement( 'p', null ); |
586 | 577 | $htmlOut .= Xml::check( 'fundraising', $fundraising, |
587 | 578 | wfArrayMerge( $disabled, array( 'id' => 'fundraising' ) ) ); |
588 | 579 | $htmlOut .= Xml::label( wfMsg( 'centralnotice-banner-fundraising' ), |
589 | 580 | 'fundraising' ); |
590 | | - $htmlOut .= Xml::closeElement( 'p' ); |
| 581 | + $htmlOut .= Html::closeElement( 'p' ); |
591 | 582 | if ( $fundraising ) { |
592 | | - $htmlOut .= Xml::openElement( 'div', array( 'id'=>'fundraisingInterface' ) ); |
| 583 | + $htmlOut .= Html::openElement( 'div', array( 'id'=>'fundraisingInterface' ) ); |
593 | 584 | } else { |
594 | | - $htmlOut .= Xml::openElement( 'div', |
| 585 | + $htmlOut .= Html::openElement( 'div', |
595 | 586 | array( 'id'=>'fundraisingInterface', 'style'=>'display:none;' ) ); |
596 | 587 | } |
597 | 588 | $htmlOut .= Xml::tags( 'p', array(), |
— | — | @@ -602,11 +593,11 @@ |
603 | 594 | array( 'maxlength' => 255 ) |
604 | 595 | ) |
605 | 596 | ); |
606 | | - $htmlOut .= Xml::closeElement( 'div' ); |
| 597 | + $htmlOut .= Html::closeElement( 'div' ); |
607 | 598 | } |
608 | 599 | |
609 | 600 | // Begin banner body section |
610 | | - $htmlOut .= Xml::closeElement( 'fieldset' ); |
| 601 | + $htmlOut .= Html::closeElement( 'fieldset' ); |
611 | 602 | if ( $this->editable ) { |
612 | 603 | $htmlOut .= Xml::fieldset( wfMsg( 'centralnotice-edit-template' ) ); |
613 | 604 | $htmlOut .= wfMsg( 'centralnotice-edit-template-summary' ); |
— | — | @@ -623,7 +614,7 @@ |
624 | 615 | $htmlOut .= Xml::fieldset( wfMsg( 'centralnotice-banner' ) ); |
625 | 616 | } |
626 | 617 | $htmlOut .= Xml::textarea( 'templateBody', $body, 60, 20, $readonly ); |
627 | | - $htmlOut .= Xml::closeElement( 'fieldset' ); |
| 618 | + $htmlOut .= Html::closeElement( 'fieldset' ); |
628 | 619 | if ( $this->editable ) { |
629 | 620 | // Indicate which form was submitted |
630 | 621 | $htmlOut .= Html::hidden( 'mainform', 'true' ); |
— | — | @@ -632,12 +623,12 @@ |
633 | 624 | array( 'class' => 'cn-buttons' ), |
634 | 625 | Xml::submitButton( wfMsg( 'centralnotice-save-banner' ) ) |
635 | 626 | ); |
636 | | - $htmlOut .= Xml::closeElement( 'form' ); |
| 627 | + $htmlOut .= Html::closeElement( 'form' ); |
637 | 628 | } |
638 | 629 | |
639 | 630 | // Show clone form |
640 | 631 | if ( $this->editable ) { |
641 | | - $htmlOut .= Xml::openElement ( 'form', |
| 632 | + $htmlOut .= Html::openElement ( 'form', |
642 | 633 | array( |
643 | 634 | 'method' => 'post', |
644 | 635 | 'action' => $this->getTitle( 'clone' )->getLocalUrl() |
— | — | @@ -645,8 +636,8 @@ |
646 | 637 | ); |
647 | 638 | |
648 | 639 | $htmlOut .= Xml::fieldset( wfMsg( 'centralnotice-clone-notice' ) ); |
649 | | - $htmlOut .= Xml::openElement( 'table', array( 'cellpadding' => 9 ) ); |
650 | | - $htmlOut .= Xml::openElement( 'tr' ); |
| 640 | + $htmlOut .= Html::openElement( 'table', array( 'cellpadding' => 9 ) ); |
| 641 | + $htmlOut .= Html::openElement( 'tr' ); |
651 | 642 | $htmlOut .= Xml::inputLabel( |
652 | 643 | wfMsg( 'centralnotice-clone-name' ), |
653 | 644 | 'newTemplate', 'newTemplate', '25' ); |
— | — | @@ -655,15 +646,15 @@ |
656 | 647 | array ( 'id' => 'clone' ) ); |
657 | 648 | $htmlOut .= Html::hidden( 'oldTemplate', $currentTemplate ); |
658 | 649 | |
659 | | - $htmlOut .= Xml::closeElement( 'tr' ); |
660 | | - $htmlOut .= Xml::closeElement( 'table' ); |
| 650 | + $htmlOut .= Html::closeElement( 'tr' ); |
| 651 | + $htmlOut .= Html::closeElement( 'table' ); |
661 | 652 | $htmlOut .= Html::hidden( 'authtoken', $wgUser->editToken() ); |
662 | | - $htmlOut .= Xml::closeElement( 'fieldset' ); |
663 | | - $htmlOut .= Xml::closeElement( 'form' ); |
| 653 | + $htmlOut .= Html::closeElement( 'fieldset' ); |
| 654 | + $htmlOut .= Html::closeElement( 'form' ); |
664 | 655 | } |
665 | 656 | |
666 | 657 | // End View Banner fieldset |
667 | | - $htmlOut .= Xml::closeElement( 'fieldset' ); |
| 658 | + $htmlOut .= Html::closeElement( 'fieldset' ); |
668 | 659 | |
669 | 660 | // Output HTML |
670 | 661 | $wgOut->addHTML( $htmlOut ); |
— | — | @@ -686,9 +677,9 @@ |
687 | 678 | $htmlOut = ''; |
688 | 679 | |
689 | 680 | // Begin View Banner fieldset |
690 | | - $htmlOut .= Xml::openElement( 'fieldset', array( 'class' => 'prefsection' ) ); |
| 681 | + $htmlOut .= Html::openElement( 'fieldset', array( 'class' => 'prefsection' ) ); |
691 | 682 | |
692 | | - $htmlOut .= Xml::element( 'h2', null, wfMsg( 'centralnotice-banner-heading', $template ) ); |
| 683 | + $htmlOut .= Html::element( 'h2', null, wfMsg( 'centralnotice-banner-heading', $template ) ); |
693 | 684 | |
694 | 685 | foreach ( $langs as $lang ) { |
695 | 686 | // Link and Preview all available translations |
— | — | @@ -713,7 +704,7 @@ |
714 | 705 | } |
715 | 706 | |
716 | 707 | // End View Banner fieldset |
717 | | - $htmlOut .= Xml::closeElement( 'fieldset' ); |
| 708 | + $htmlOut .= Html::closeElement( 'fieldset' ); |
718 | 709 | |
719 | 710 | return $wgOut->addHtml( $htmlOut ); |
720 | 711 | } |
— | — | @@ -730,7 +721,7 @@ |
731 | 722 | $article->doEdit( $translation, '', EDIT_FORCE_BOT ); |
732 | 723 | } |
733 | 724 | |
734 | | - private function getTemplateId ( $templateName ) { |
| 725 | + private static function getTemplateId ( $templateName ) { |
735 | 726 | $dbr = wfGetDB( DB_SLAVE ); |
736 | 727 | $res = $dbr->select( 'cn_templates', 'tmp_id', |
737 | 728 | array( 'tmp_name' => $templateName ), |
— | — | @@ -743,9 +734,20 @@ |
744 | 735 | } |
745 | 736 | return null; |
746 | 737 | } |
| 738 | + |
| 739 | + public static function getBannerName( $bannerId ) { |
| 740 | + $dbr = wfGetDB( DB_MASTER ); |
| 741 | + if ( is_numeric( $bannerId ) ) { |
| 742 | + $row = $dbr->selectRow( 'cn_templates', 'tmp_name', array( 'tmp_id' => $bannerId ) ); |
| 743 | + if ( $row ) { |
| 744 | + return $row->tmp_name; |
| 745 | + } |
| 746 | + } |
| 747 | + return null; |
| 748 | + } |
747 | 749 | |
748 | | - private function removeTemplate ( $name ) { |
749 | | - $id = $this->getTemplateId( $name ); |
| 750 | + public function removeTemplate ( $name ) { |
| 751 | + $id = SpecialNoticeTemplate::getTemplateId( $name ); |
750 | 752 | $dbr = wfGetDB( DB_SLAVE ); |
751 | 753 | $res = $dbr->select( 'cn_assignments', 'asn_id', array( 'tmp_id' => $id ), __METHOD__ ); |
752 | 754 | |
— | — | @@ -753,6 +755,9 @@ |
754 | 756 | $this->showError( 'centralnotice-template-still-bound' ); |
755 | 757 | return; |
756 | 758 | } else { |
| 759 | + // Log the removal of the banner |
| 760 | + $this->logBannerChange( 'removed', $id ); |
| 761 | + |
757 | 762 | $dbw = wfGetDB( DB_MASTER ); |
758 | 763 | $dbw->begin(); |
759 | 764 | $dbw->delete( 'cn_templates', |
— | — | @@ -770,13 +775,20 @@ |
771 | 776 | |
772 | 777 | /** |
773 | 778 | * Create a new banner |
| 779 | + * @param $name string name of banner |
| 780 | + * @param $body string content of banner |
| 781 | + * @param $displayAnon integer flag for display to anonymous users |
| 782 | + * @param $displayAccount integer flag for display to logged in users |
| 783 | + * @param $fundraising integer flag for fundraising banner (optional) |
| 784 | + * @param $landingPages string list of landing pages (optional) |
| 785 | + * @return true or false depending on whether banner was successfully added |
774 | 786 | */ |
775 | | - private function addTemplate( $name, $body, $displayAnon, $displayAccount, $fundraising, |
776 | | - $landingPages ) { |
| 787 | + public function addTemplate( $name, $body, $displayAnon, $displayAccount, $fundraising = 0, |
| 788 | + $landingPages = '' ) { |
777 | 789 | |
778 | 790 | if ( $body == '' || $name == '' ) { |
779 | 791 | $this->showError( 'centralnotice-null-string' ); |
780 | | - return; |
| 792 | + return false; |
781 | 793 | } |
782 | 794 | |
783 | 795 | // Format name so there are only letters, numbers, and underscores |
— | — | @@ -805,12 +817,24 @@ |
806 | 818 | ), |
807 | 819 | __METHOD__ |
808 | 820 | ); |
| 821 | + $bannerId = $dbw->insertId(); |
809 | 822 | |
810 | 823 | // Perhaps these should move into the db as blobs instead of being stored as articles |
811 | 824 | $article = new Article( |
812 | 825 | Title::newFromText( "centralnotice-template-{$name}", NS_MEDIAWIKI ) |
813 | 826 | ); |
814 | 827 | $article->doEdit( $body, '', EDIT_FORCE_BOT ); |
| 828 | + |
| 829 | + // Log the creation of the banner |
| 830 | + $beginSettings = array(); |
| 831 | + $endSettings = array( |
| 832 | + 'anon' => $displayAnon, |
| 833 | + 'account' => $displayAccount, |
| 834 | + 'fundraising' => $fundraising, |
| 835 | + 'landingpages' => $landingPages |
| 836 | + ); |
| 837 | + $this->logBannerChange( 'created', $bannerId, $beginSettings, $endSettings ); |
| 838 | + |
815 | 839 | return true; |
816 | 840 | } |
817 | 841 | } |
— | — | @@ -825,6 +849,8 @@ |
826 | 850 | $this->showError( 'centralnotice-null-string' ); |
827 | 851 | return; |
828 | 852 | } |
| 853 | + |
| 854 | + $initialBannerSettings = CentralNoticeDB::getBannerSettings( $name ); |
829 | 855 | |
830 | 856 | $dbr = wfGetDB( DB_SLAVE ); |
831 | 857 | $res = $dbr->select( 'cn_templates', 'tmp_name', |
— | — | @@ -848,7 +874,27 @@ |
849 | 875 | $article = new Article( |
850 | 876 | Title::newFromText( "centralnotice-template-{$name}", NS_MEDIAWIKI ) |
851 | 877 | ); |
| 878 | + |
| 879 | + $bodyPage = Title::newFromText( |
| 880 | + "Centralnotice-template-{$name}", NS_MEDIAWIKI ); |
| 881 | + $curRev = Revision::newFromTitle( $bodyPage ); |
| 882 | + $oldbody = $curRev ? $curRev->getText() : ''; |
| 883 | + |
852 | 884 | $article->doEdit( $body, '', EDIT_FORCE_BOT ); |
| 885 | + |
| 886 | + $curRev = Revision::newFromTitle( $bodyPage ); |
| 887 | + $newbody = $curRev ? $curRev->getText() : ''; |
| 888 | + |
| 889 | + //test for body changes |
| 890 | + $contentChanged = 0; |
| 891 | + if ($newbody !== $oldbody){ |
| 892 | + $contentChanged = 1; |
| 893 | + } |
| 894 | + |
| 895 | + $bannerId = SpecialNoticeTemplate::getTemplateId( $name ); |
| 896 | + $finalBannerSettings = CentralNoticeDB::getBannerSettings( $name ); |
| 897 | + $this->logBannerChange( 'modified', $bannerId, $initialBannerSettings, $finalBannerSettings, $contentChanged); |
| 898 | + |
853 | 899 | return; |
854 | 900 | } |
855 | 901 | } |
— | — | @@ -960,5 +1006,42 @@ |
961 | 1007 | $wgOut->wrapWikiMsg( "<div class='cn-error'>\n$1\n</div>", $message ); |
962 | 1008 | $this->centralNoticeError = true; |
963 | 1009 | } |
| 1010 | + |
| 1011 | + /** |
| 1012 | + * Log setting changes related to a banner |
| 1013 | + * @param $action string: 'created', 'modified', or 'removed' |
| 1014 | + * @param $bannerId integer: ID of banner |
| 1015 | + * @param $beginSettings array of banner settings before changes (optional) |
| 1016 | + * @param $endSettings array of banner settings after changes (optional) |
| 1017 | + * @param $beginContent banner content before changes (optional) |
| 1018 | + * @param $endContent banner content after changes (optional) |
| 1019 | + */ |
| 1020 | + function logBannerChange( $action, $bannerId, $beginSettings = array(), |
| 1021 | + $endSettings = array(), $contentChanged = 0 ) |
| 1022 | + { |
| 1023 | + global $wgUser; |
| 1024 | + |
| 1025 | + $dbw = wfGetDB( DB_MASTER ); |
| 1026 | + |
| 1027 | + $log = array( |
| 1028 | + 'tmplog_timestamp' => $dbw->timestamp(), |
| 1029 | + 'tmplog_user_id' => $wgUser->getId(), |
| 1030 | + 'tmplog_action' => $action, |
| 1031 | + 'tmplog_template_id' => $bannerId, |
| 1032 | + 'tmplog_template_name' => SpecialNoticeTemplate::getBannerName( $bannerId ), |
| 1033 | + 'tmplog_content_change' => $contentChanged |
| 1034 | + ); |
| 1035 | + |
| 1036 | + foreach ( $beginSettings as $key => $value ) { |
| 1037 | + $log['tmplog_begin_'.$key] = $value; |
| 1038 | + } |
| 1039 | + foreach ( $endSettings as $key => $value ) { |
| 1040 | + $log['tmplog_end_'.$key] = $value; |
| 1041 | + } |
| 1042 | + |
| 1043 | + $res = $dbw->insert( 'cn_template_log', $log ); |
| 1044 | + $log_id = $dbw->insertId(); |
| 1045 | + return $log_id; |
| 1046 | + } |
964 | 1047 | |
965 | 1048 | } |
Property changes on: branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialNoticeTemplate.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
966 | 1049 | Merged /trunk/extensions/CentralNotice/special/SpecialNoticeTemplate.php:r62820-67552,67557,67559-71720,71725-71731,71734-71739,71748-71753,71774-71997,72058-72131,72136-73830,73847,73850,73852,73855,73959,73963,73973,73980,73983,73991,73994-73995,74000-74321,74325-74406,75376-75470,75567,75643,75646,75674,75680,75726,75849,75889,75908,75973,76141,76145,76333,76347,76351,76356-76358,76361,76363,76462,76543,76763,77622-79761,79780,79783-80145,80147-80148,80150,80152-80602,81461-83563,83565-95513 |
967 | 1050 | Merged /trunk/phase3/extensions/CentralNotice/special/SpecialNoticeTemplate.php:r63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816,77555,77558-77560,77563-77565,77573 |
968 | 1051 | Merged /branches/wmf-deployment/extensions/CentralNotice/special/SpecialNoticeTemplate.php:r60970 |
969 | 1052 | Merged /branches/wmf/1.16wmf4/extensions/CentralNotice/special/SpecialNoticeTemplate.php:r67177,69199,76243,77266 |
Index: branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialHideBanners.php |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | header( 'Content-Type: image/png' ); |
27 | 27 | header( 'Cache-Control: no-cache' ); |
28 | 28 | |
29 | | - readfile( dirname( __FILE__ ) . '/1x1.png' ); |
| 29 | + readfile( dirname( __FILE__ ) . '/../1x1.png' ); |
30 | 30 | } |
31 | 31 | |
32 | 32 | function setHideCookie() { |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | } else { |
38 | 38 | $cookieDomain = $wgNoticeCookieDomain; |
39 | 39 | } |
40 | | - // Hide banners for this domain |
41 | | - setcookie( 'hidesnmessage', '1', $exp, '/', $cookieDomain, $wgCookieSecure ); |
| 40 | + // Hide fundraising banners for this domain |
| 41 | + setcookie( 'centralnotice_fundraising', 'hide', $exp, '/', $cookieDomain, $wgCookieSecure ); |
42 | 42 | } |
43 | 43 | } |
Property changes on: branches/wmf/1.17wmf1/extensions/CentralNotice/special/SpecialHideBanners.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
44 | 44 | Merged /branches/wmf/1.16wmf4/extensions/CentralNotice/special/SpecialHideBanners.php:r67177,69199,76243,77266 |
45 | 45 | Merged /trunk/extensions/CentralNotice/special/SpecialHideBanners.php:r62820-67552,67557,67559-71720,71725-71731,71734-71739,71748-71753,71774-71997,72058-72131,72136-73830,73847,73850,73852,73855,73959,73963,73973,73980,73983,73991,73994-73995,74000-74321,74325-74406,75376-75470,75567,75643,75646,75674,75680,75726,75849,75889,75908,75973,76141,76145,76333,76347,76351,76356-76358,76361,76363,76462,76543,76763,77622-79761,79780,79783-80145,80147-80148,80150,80152-80602,81461-83563,83565-95513 |
46 | 46 | Merged /trunk/phase3/extensions/CentralNotice/special/SpecialHideBanners.php:r63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816,77555,77558-77560,77563-77565,77573 |
47 | 47 | Merged /branches/wmf-deployment/extensions/CentralNotice/special/SpecialHideBanners.php:r60970 |