Index: branches/wmf/1.16wmf4/extensions/CentralNotice/TemplatePager.php |
— | — | @@ -100,7 +100,7 @@ |
101 | 101 | $htmlOut = ''; |
102 | 102 | $htmlOut .= Xml::closeElement( 'table' ); |
103 | 103 | if ( $this->editable ) { |
104 | | - $htmlOut .= Xml::hidden( 'authtoken', $wgUser->editToken() ); |
| 104 | + $htmlOut .= Html::hidden( 'authtoken', $wgUser->editToken() ); |
105 | 105 | $htmlOut .= Xml::tags( 'div', |
106 | 106 | array( 'class' => 'cn-buttons' ), |
107 | 107 | Xml::submitButton( wfMsg( 'centralnotice-modify' ) ) |
Index: branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialCentralNotice.php |
— | — | @@ -477,8 +477,8 @@ |
478 | 478 | // Form for adding a campaign |
479 | 479 | $htmlOut .= Xml::openElement( 'form', array( 'method' => 'post' ) ); |
480 | 480 | $htmlOut .= Xml::element( 'h2', null, wfMsg( 'centralnotice-add-notice' ) ); |
481 | | - $htmlOut .= Xml::hidden( 'title', $this->getTitle()->getPrefixedText() ); |
482 | | - $htmlOut .= Xml::hidden( 'method', 'addNotice' ); |
| 481 | + $htmlOut .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() ); |
| 482 | + $htmlOut .= Html::hidden( 'method', 'addNotice' ); |
483 | 483 | |
484 | 484 | $htmlOut .= Xml::openElement( 'table', array ( 'cellpadding' => 9 ) ); |
485 | 485 | |
— | — | @@ -525,8 +525,8 @@ |
526 | 526 | $htmlOut .= Xml::closeElement( 'tr' ); |
527 | 527 | |
528 | 528 | $htmlOut .= Xml::closeElement( 'table' ); |
529 | | - $htmlOut .= Xml::hidden( 'change', 'weight' ); |
530 | | - $htmlOut .= Xml::hidden( 'authtoken', $wgUser->editToken() ); |
| 529 | + $htmlOut .= Html::hidden( 'change', 'weight' ); |
| 530 | + $htmlOut .= Html::hidden( 'authtoken', $wgUser->editToken() ); |
531 | 531 | |
532 | 532 | // Submit button |
533 | 533 | $htmlOut .= Xml::tags( 'div', |
— | — | @@ -934,7 +934,7 @@ |
935 | 935 | } |
936 | 936 | |
937 | 937 | // Build Assigned banners HTML |
938 | | - $htmlOut = Xml::hidden( 'change', 'weight' ); |
| 938 | + $htmlOut = Html::hidden( 'change', 'weight' ); |
939 | 939 | $htmlOut .= Xml::fieldset( wfMsg( 'centralnotice-assigned-templates' ) ); |
940 | 940 | $htmlOut .= Xml::openElement( 'table', |
941 | 941 | array( |
— | — | @@ -1353,8 +1353,6 @@ |
1354 | 1354 | * Update the preferred/not preferred state of a campaign |
1355 | 1355 | */ |
1356 | 1356 | function updatePreferred( $noticeName, $isPreferred ) { |
1357 | | - global $wgOut; |
1358 | | - |
1359 | 1357 | if ( !$this->noticeExists( $noticeName ) ) { |
1360 | 1358 | $this->showError( 'centralnotice-doesnt-exist' ); |
1361 | 1359 | } else { |
— | — | @@ -1549,7 +1547,7 @@ |
1550 | 1548 | // Remove disassociated countries |
1551 | 1549 | $removeCountries = array_diff( $oldCountries, $newCountries ); |
1552 | 1550 | if ( $removeCountries ) { |
1553 | | - $res = $dbw->delete( 'cn_notice_countries', |
| 1551 | + $dbw->delete( 'cn_notice_countries', |
1554 | 1552 | array( 'nc_notice_id' => $row->not_id, 'nc_country' => $removeCountries ) |
1555 | 1553 | ); |
1556 | 1554 | } |
Index: branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialBannerAllocation.php |
— | — | @@ -31,10 +31,10 @@ |
32 | 32 | $this->setHeaders(); |
33 | 33 | |
34 | 34 | // Add style file to the output headers |
35 | | - $wgOut->addExtensionStyle( "$wgScriptPath/extensions/CentralNotice/centralnotice.css" ); |
| 35 | + $wgOut->addExtensionStyle( "$wgExtensionAssetsPath/CentralNotice/centralnotice.css" ); |
36 | 36 | |
37 | 37 | // Add script file to the output headers |
38 | | - $wgOut->addScriptFile( "$wgScriptPath/extensions/CentralNotice/centralnotice.js" ); |
| 38 | + $wgOut->addScriptFile( "$wgExtensionAssetsPath/CentralNotice/centralnotice.js" ); |
39 | 39 | |
40 | 40 | // Initialize error variable |
41 | 41 | $this->centralNoticeError = false; |
Index: branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialNoticeTemplate.php |
— | — | @@ -225,7 +225,7 @@ |
226 | 226 | $htmlOut .= Xml::openElement( 'form', |
227 | 227 | array( 'method' => 'post', 'onsubmit' => 'return validateBannerForm(this)' ) ); |
228 | 228 | $htmlOut .= Xml::element( 'h2', null, wfMsg( 'centralnotice-add-template' ) ); |
229 | | - $htmlOut .= Xml::hidden( 'wpMethod', 'addTemplate' ); |
| 229 | + $htmlOut .= Html::hidden( 'wpMethod', 'addTemplate' ); |
230 | 230 | $htmlOut .= Xml::tags( 'p', null, |
231 | 231 | Xml::inputLabel( |
232 | 232 | wfMsg( 'centralnotice-banner-name' ), |
— | — | @@ -276,7 +276,7 @@ |
277 | 277 | |
278 | 278 | $htmlOut .= Xml::textarea( 'templateBody', $body, 60, 20 ); |
279 | 279 | $htmlOut .= Xml::closeElement( 'fieldset' ); |
280 | | - $htmlOut .= Xml::hidden( 'authtoken', $wgUser->editToken() ); |
| 280 | + $htmlOut .= Html::hidden( 'authtoken', $wgUser->editToken() ); |
281 | 281 | |
282 | 282 | // Submit button |
283 | 283 | $htmlOut .= Xml::tags( 'div', |
— | — | @@ -463,9 +463,9 @@ |
464 | 464 | $htmlOut .= Xml::closeElement( 'table' ); |
465 | 465 | |
466 | 466 | if ( $this->editable ) { |
467 | | - $htmlOut .= Xml::hidden( 'wpUserLanguage', $wpUserLang ); |
468 | | - $htmlOut .= Xml::hidden( 'authtoken', $wgUser->editToken() ); |
469 | | - $htmlOut .= Xml::tags( 'div', |
| 467 | + $htmlOut .= Html::hidden( 'wpUserLanguage', $wpUserLang ); |
| 468 | + $htmlOut .= Html::hidden( 'authtoken', $wgUser->editToken() ); |
| 469 | + $htmlOut .= Xml::tags( 'div', |
470 | 470 | array( 'class' => 'cn-buttons' ), |
471 | 471 | Xml::submitButton( |
472 | 472 | wfMsg( 'centralnotice-modify' ), |
— | — | @@ -505,7 +505,7 @@ |
506 | 506 | ) |
507 | 507 | ); |
508 | 508 | $htmlOut .= Xml::closeElement( 'table' ); |
509 | | - $htmlOut .= Xml::hidden( 'authtoken', $wgUser->editToken() ); |
| 509 | + $htmlOut .= Html::hidden( 'authtoken', $wgUser->editToken() ); |
510 | 510 | $htmlOut .= Xml::closeElement( 'fieldset' ); |
511 | 511 | $htmlOut .= Xml::closeElement( 'form' ); |
512 | 512 | } |
— | — | @@ -518,7 +518,7 @@ |
519 | 519 | 'onsubmit' => 'return validateBannerForm(this)' |
520 | 520 | ) |
521 | 521 | ); |
522 | | - $htmlOut .= Xml::hidden( 'wpMethod', 'editTemplate' ); |
| 522 | + $htmlOut .= Html::hidden( 'wpMethod', 'editTemplate' ); |
523 | 523 | } |
524 | 524 | |
525 | 525 | // If there was an error, we'll need to restore the state of the form |
— | — | @@ -593,11 +593,11 @@ |
594 | 594 | $htmlOut .= Xml::submitButton( |
595 | 595 | wfMsg( 'centralnotice-clone' ), |
596 | 596 | array ( 'id' => 'clone' ) ); |
597 | | - $htmlOut .= Xml::hidden( 'oldTemplate', $currentTemplate ); |
| 597 | + $htmlOut .= Html::hidden( 'oldTemplate', $currentTemplate ); |
598 | 598 | |
599 | 599 | $htmlOut .= Xml::closeElement( 'tr' ); |
600 | 600 | $htmlOut .= Xml::closeElement( 'table' ); |
601 | | - $htmlOut .= Xml::hidden( 'authtoken', $wgUser->editToken() ); |
| 601 | + $htmlOut .= Html::hidden( 'authtoken', $wgUser->editToken() ); |
602 | 602 | $htmlOut .= Xml::closeElement( 'fieldset' ); |
603 | 603 | $htmlOut .= Xml::closeElement( 'form' ); |
604 | 604 | } |
— | — | @@ -690,7 +690,7 @@ |
691 | 691 | } else { |
692 | 692 | $dbw = wfGetDB( DB_MASTER ); |
693 | 693 | $dbw->begin(); |
694 | | - $res = $dbw->delete( 'cn_templates', |
| 694 | + $dbw->delete( 'cn_templates', |
695 | 695 | array( 'tmp_id' => $id ), |
696 | 696 | __METHOD__ |
697 | 697 | ); |
Property changes on: branches/wmf/1.16wmf4/extensions/CentralNotice |
___________________________________________________________________ |
Modified: svn:mergeinfo |
698 | 698 | Merged /trunk/extensions/CentralNotice:r75567,75646,75680 |