Index: trunk/extensions/CentralNotice/SpecialNoticeTemplate.php |
— | — | @@ -220,7 +220,8 @@ |
221 | 221 | * Show "Add a banner" interface |
222 | 222 | */ |
223 | 223 | function showAdd() { |
224 | | - global $wgOut, $wgUser, $wgExtensionAssetsPath, $wgLang, $wgRequest, $wgNoticeEnableFundraising; |
| 224 | + global $wgOut, $wgUser, $wgExtensionAssetsPath, $wgLang, $wgRequest, |
| 225 | + $wgNoticeEnableFundraising; |
225 | 226 | $scriptPath = "$wgExtensionAssetsPath/CentralNotice"; |
226 | 227 | |
227 | 228 | // Build HTML |
— | — | @@ -271,7 +272,8 @@ |
272 | 273 | $htmlOut .= Xml::check( 'fundraising', $fundraising, array( 'id' => 'fundraising' ) ); |
273 | 274 | $htmlOut .= Xml::label( wfMsg( 'centralnotice-banner-fundraising' ), 'fundraising' ); |
274 | 275 | $htmlOut .= Xml::closeElement( 'p' ); |
275 | | - $htmlOut .= Xml::openElement( 'div', array( 'id' => 'fundraisingInterface', 'style' => 'display: none;' ) ); |
| 276 | + $htmlOut .= Xml::openElement( 'div', |
| 277 | + array( 'id' => 'fundraisingInterface', 'style' => 'display: none;' ) ); |
276 | 278 | $htmlOut .= Xml::tags( 'p', array(), wfMsg( 'centralnotice-banner-fundraising-help' ) ); |
277 | 279 | $htmlOut .= Xml::tags( 'p', array(), |
278 | 280 | Xml::inputLabel( |
— | — | @@ -316,7 +318,8 @@ |
317 | 319 | * View or edit an individual banner |
318 | 320 | */ |
319 | 321 | private function showView() { |
320 | | - global $wgOut, $wgUser, $wgRequest, $wgLanguageCode, $wgExtensionAssetsPath, $wgLang, $wgNoticeEnableFundraising; |
| 322 | + global $wgOut, $wgUser, $wgRequest, $wgLanguageCode, $wgExtensionAssetsPath, $wgLang, |
| 323 | + $wgNoticeEnableFundraising; |
321 | 324 | |
322 | 325 | $scriptPath = "$wgExtensionAssetsPath/CentralNotice"; |
323 | 326 | $sk = $wgUser->getSkin(); |
— | — | @@ -581,14 +584,17 @@ |
582 | 585 | $htmlOut .= Xml::openElement( 'p', null ); |
583 | 586 | $htmlOut .= Xml::check( 'fundraising', $fundraising, |
584 | 587 | wfArrayMerge( $disabled, array( 'id' => 'fundraising' ) ) ); |
585 | | - $htmlOut .= Xml::label( wfMsg( 'centralnotice-banner-fundraising' ), 'fundraising' ); |
| 588 | + $htmlOut .= Xml::label( wfMsg( 'centralnotice-banner-fundraising' ), |
| 589 | + 'fundraising' ); |
586 | 590 | $htmlOut .= Xml::closeElement( 'p' ); |
587 | 591 | if ( $fundraising ) { |
588 | 592 | $htmlOut .= Xml::openElement( 'div', array( 'id'=>'fundraisingInterface' ) ); |
589 | 593 | } else { |
590 | | - $htmlOut .= Xml::openElement( 'div', array( 'id'=>'fundraisingInterface', 'style'=>'display:none;' ) ); |
| 594 | + $htmlOut .= Xml::openElement( 'div', |
| 595 | + array( 'id'=>'fundraisingInterface', 'style'=>'display:none;' ) ); |
591 | 596 | } |
592 | | - $htmlOut .= Xml::tags( 'p', array(), wfMsg( 'centralnotice-banner-fundraising-help' ) ); |
| 597 | + $htmlOut .= Xml::tags( 'p', array(), |
| 598 | + wfMsg( 'centralnotice-banner-fundraising-help' ) ); |
593 | 599 | $htmlOut .= Xml::tags( 'p', array(), |
594 | 600 | Xml::inputLabel( |
595 | 601 | wfMsg( 'centralnotice-banner-landing-pages' ), |
— | — | @@ -765,7 +771,9 @@ |
766 | 772 | /** |
767 | 773 | * Create a new banner |
768 | 774 | */ |
769 | | - private function addTemplate( $name, $body, $displayAnon, $displayAccount, $fundraising, $landingPages ) { |
| 775 | + private function addTemplate( $name, $body, $displayAnon, $displayAccount, $fundraising, |
| 776 | + $landingPages ) { |
| 777 | + |
770 | 778 | if ( $body == '' || $name == '' ) { |
771 | 779 | $this->showError( 'centralnotice-null-string' ); |
772 | 780 | return; |
— | — | @@ -810,7 +818,9 @@ |
811 | 819 | /** |
812 | 820 | * Update a banner |
813 | 821 | */ |
814 | | - private function editTemplate( $name, $body, $displayAnon, $displayAccount, $fundraising, $landingPages ) { |
| 822 | + private function editTemplate( $name, $body, $displayAnon, $displayAccount, $fundraising, |
| 823 | + $landingPages ) { |
| 824 | + |
815 | 825 | if ( $body == '' || $name == '' ) { |
816 | 826 | $this->showError( 'centralnotice-null-string' ); |
817 | 827 | return; |
— | — | @@ -879,7 +889,8 @@ |
880 | 890 | $template_body = Revision::newFromTitle( $bodyPage )->getText(); |
881 | 891 | |
882 | 892 | // Create new banner |
883 | | - if ( $this->addTemplate( $dest, $template_body, $displayAnon, $displayAccount, $fundraising, $landingPages ) ) { |
| 893 | + if ( $this->addTemplate( $dest, $template_body, $displayAnon, $displayAccount, $fundraising, |
| 894 | + $landingPages ) ) { |
884 | 895 | |
885 | 896 | // Populate the fields |
886 | 897 | foreach ( $langs as $lang => $fields ) { |