r76155 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76154‎ | r76155 | r76156 >
Date:22:42, 5 November 2010
Author:tomasz
Status:ok
Tags:
Comment:
Merging in 73959, 75567, 75680, and 75646
Modified paths:
  • /branches/wmf/1.16wmf4/extensions/CentralNotice (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialBannerAllocation.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialCentralNotice.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialNoticeTemplate.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/CentralNotice/TemplatePager.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.16wmf4/extensions/CentralNotice/TemplatePager.php
@@ -100,7 +100,7 @@
101101 $htmlOut = '';
102102 $htmlOut .= Xml::closeElement( 'table' );
103103 if ( $this->editable ) {
104 - $htmlOut .= Xml::hidden( 'authtoken', $wgUser->editToken() );
 104+ $htmlOut .= Html::hidden( 'authtoken', $wgUser->editToken() );
105105 $htmlOut .= Xml::tags( 'div',
106106 array( 'class' => 'cn-buttons' ),
107107 Xml::submitButton( wfMsg( 'centralnotice-modify' ) )
Index: branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialCentralNotice.php
@@ -477,8 +477,8 @@
478478 // Form for adding a campaign
479479 $htmlOut .= Xml::openElement( 'form', array( 'method' => 'post' ) );
480480 $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' );
483483
484484 $htmlOut .= Xml::openElement( 'table', array ( 'cellpadding' => 9 ) );
485485
@@ -525,8 +525,8 @@
526526 $htmlOut .= Xml::closeElement( 'tr' );
527527
528528 $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() );
531531
532532 // Submit button
533533 $htmlOut .= Xml::tags( 'div',
@@ -934,7 +934,7 @@
935935 }
936936
937937 // Build Assigned banners HTML
938 - $htmlOut = Xml::hidden( 'change', 'weight' );
 938+ $htmlOut = Html::hidden( 'change', 'weight' );
939939 $htmlOut .= Xml::fieldset( wfMsg( 'centralnotice-assigned-templates' ) );
940940 $htmlOut .= Xml::openElement( 'table',
941941 array(
@@ -1353,8 +1353,6 @@
13541354 * Update the preferred/not preferred state of a campaign
13551355 */
13561356 function updatePreferred( $noticeName, $isPreferred ) {
1357 - global $wgOut;
1358 -
13591357 if ( !$this->noticeExists( $noticeName ) ) {
13601358 $this->showError( 'centralnotice-doesnt-exist' );
13611359 } else {
@@ -1549,7 +1547,7 @@
15501548 // Remove disassociated countries
15511549 $removeCountries = array_diff( $oldCountries, $newCountries );
15521550 if ( $removeCountries ) {
1553 - $res = $dbw->delete( 'cn_notice_countries',
 1551+ $dbw->delete( 'cn_notice_countries',
15541552 array( 'nc_notice_id' => $row->not_id, 'nc_country' => $removeCountries )
15551553 );
15561554 }
Index: branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialBannerAllocation.php
@@ -31,10 +31,10 @@
3232 $this->setHeaders();
3333
3434 // Add style file to the output headers
35 - $wgOut->addExtensionStyle( "$wgScriptPath/extensions/CentralNotice/centralnotice.css" );
 35+ $wgOut->addExtensionStyle( "$wgExtensionAssetsPath/CentralNotice/centralnotice.css" );
3636
3737 // Add script file to the output headers
38 - $wgOut->addScriptFile( "$wgScriptPath/extensions/CentralNotice/centralnotice.js" );
 38+ $wgOut->addScriptFile( "$wgExtensionAssetsPath/CentralNotice/centralnotice.js" );
3939
4040 // Initialize error variable
4141 $this->centralNoticeError = false;
Index: branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialNoticeTemplate.php
@@ -225,7 +225,7 @@
226226 $htmlOut .= Xml::openElement( 'form',
227227 array( 'method' => 'post', 'onsubmit' => 'return validateBannerForm(this)' ) );
228228 $htmlOut .= Xml::element( 'h2', null, wfMsg( 'centralnotice-add-template' ) );
229 - $htmlOut .= Xml::hidden( 'wpMethod', 'addTemplate' );
 229+ $htmlOut .= Html::hidden( 'wpMethod', 'addTemplate' );
230230 $htmlOut .= Xml::tags( 'p', null,
231231 Xml::inputLabel(
232232 wfMsg( 'centralnotice-banner-name' ),
@@ -276,7 +276,7 @@
277277
278278 $htmlOut .= Xml::textarea( 'templateBody', $body, 60, 20 );
279279 $htmlOut .= Xml::closeElement( 'fieldset' );
280 - $htmlOut .= Xml::hidden( 'authtoken', $wgUser->editToken() );
 280+ $htmlOut .= Html::hidden( 'authtoken', $wgUser->editToken() );
281281
282282 // Submit button
283283 $htmlOut .= Xml::tags( 'div',
@@ -463,9 +463,9 @@
464464 $htmlOut .= Xml::closeElement( 'table' );
465465
466466 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',
470470 array( 'class' => 'cn-buttons' ),
471471 Xml::submitButton(
472472 wfMsg( 'centralnotice-modify' ),
@@ -505,7 +505,7 @@
506506 )
507507 );
508508 $htmlOut .= Xml::closeElement( 'table' );
509 - $htmlOut .= Xml::hidden( 'authtoken', $wgUser->editToken() );
 509+ $htmlOut .= Html::hidden( 'authtoken', $wgUser->editToken() );
510510 $htmlOut .= Xml::closeElement( 'fieldset' );
511511 $htmlOut .= Xml::closeElement( 'form' );
512512 }
@@ -518,7 +518,7 @@
519519 'onsubmit' => 'return validateBannerForm(this)'
520520 )
521521 );
522 - $htmlOut .= Xml::hidden( 'wpMethod', 'editTemplate' );
 522+ $htmlOut .= Html::hidden( 'wpMethod', 'editTemplate' );
523523 }
524524
525525 // If there was an error, we'll need to restore the state of the form
@@ -593,11 +593,11 @@
594594 $htmlOut .= Xml::submitButton(
595595 wfMsg( 'centralnotice-clone' ),
596596 array ( 'id' => 'clone' ) );
597 - $htmlOut .= Xml::hidden( 'oldTemplate', $currentTemplate );
 597+ $htmlOut .= Html::hidden( 'oldTemplate', $currentTemplate );
598598
599599 $htmlOut .= Xml::closeElement( 'tr' );
600600 $htmlOut .= Xml::closeElement( 'table' );
601 - $htmlOut .= Xml::hidden( 'authtoken', $wgUser->editToken() );
 601+ $htmlOut .= Html::hidden( 'authtoken', $wgUser->editToken() );
602602 $htmlOut .= Xml::closeElement( 'fieldset' );
603603 $htmlOut .= Xml::closeElement( 'form' );
604604 }
@@ -690,7 +690,7 @@
691691 } else {
692692 $dbw = wfGetDB( DB_MASTER );
693693 $dbw->begin();
694 - $res = $dbw->delete( 'cn_templates',
 694+ $dbw->delete( 'cn_templates',
695695 array( 'tmp_id' => $id ),
696696 __METHOD__
697697 );
Property changes on: branches/wmf/1.16wmf4/extensions/CentralNotice
___________________________________________________________________
Modified: svn:mergeinfo
698698 Merged /trunk/extensions/CentralNotice:r75567,75646,75680

Status & tagging log