r90681 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90680‎ | r90681 | r90682 >
Date:22:19, 23 June 2011
Author:kaldari
Status:ok
Tags:
Comment:
trimming all lines to 80 chars per coding conventions
Modified paths:
  • /trunk/extensions/CentralNotice/SpecialNoticeTemplate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/SpecialNoticeTemplate.php
@@ -220,7 +220,8 @@
221221 * Show "Add a banner" interface
222222 */
223223 function showAdd() {
224 - global $wgOut, $wgUser, $wgExtensionAssetsPath, $wgLang, $wgRequest, $wgNoticeEnableFundraising;
 224+ global $wgOut, $wgUser, $wgExtensionAssetsPath, $wgLang, $wgRequest,
 225+ $wgNoticeEnableFundraising;
225226 $scriptPath = "$wgExtensionAssetsPath/CentralNotice";
226227
227228 // Build HTML
@@ -271,7 +272,8 @@
272273 $htmlOut .= Xml::check( 'fundraising', $fundraising, array( 'id' => 'fundraising' ) );
273274 $htmlOut .= Xml::label( wfMsg( 'centralnotice-banner-fundraising' ), 'fundraising' );
274275 $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;' ) );
276278 $htmlOut .= Xml::tags( 'p', array(), wfMsg( 'centralnotice-banner-fundraising-help' ) );
277279 $htmlOut .= Xml::tags( 'p', array(),
278280 Xml::inputLabel(
@@ -316,7 +318,8 @@
317319 * View or edit an individual banner
318320 */
319321 private function showView() {
320 - global $wgOut, $wgUser, $wgRequest, $wgLanguageCode, $wgExtensionAssetsPath, $wgLang, $wgNoticeEnableFundraising;
 322+ global $wgOut, $wgUser, $wgRequest, $wgLanguageCode, $wgExtensionAssetsPath, $wgLang,
 323+ $wgNoticeEnableFundraising;
321324
322325 $scriptPath = "$wgExtensionAssetsPath/CentralNotice";
323326 $sk = $wgUser->getSkin();
@@ -581,14 +584,17 @@
582585 $htmlOut .= Xml::openElement( 'p', null );
583586 $htmlOut .= Xml::check( 'fundraising', $fundraising,
584587 wfArrayMerge( $disabled, array( 'id' => 'fundraising' ) ) );
585 - $htmlOut .= Xml::label( wfMsg( 'centralnotice-banner-fundraising' ), 'fundraising' );
 588+ $htmlOut .= Xml::label( wfMsg( 'centralnotice-banner-fundraising' ),
 589+ 'fundraising' );
586590 $htmlOut .= Xml::closeElement( 'p' );
587591 if ( $fundraising ) {
588592 $htmlOut .= Xml::openElement( 'div', array( 'id'=>'fundraisingInterface' ) );
589593 } else {
590 - $htmlOut .= Xml::openElement( 'div', array( 'id'=>'fundraisingInterface', 'style'=>'display:none;' ) );
 594+ $htmlOut .= Xml::openElement( 'div',
 595+ array( 'id'=>'fundraisingInterface', 'style'=>'display:none;' ) );
591596 }
592 - $htmlOut .= Xml::tags( 'p', array(), wfMsg( 'centralnotice-banner-fundraising-help' ) );
 597+ $htmlOut .= Xml::tags( 'p', array(),
 598+ wfMsg( 'centralnotice-banner-fundraising-help' ) );
593599 $htmlOut .= Xml::tags( 'p', array(),
594600 Xml::inputLabel(
595601 wfMsg( 'centralnotice-banner-landing-pages' ),
@@ -765,7 +771,9 @@
766772 /**
767773 * Create a new banner
768774 */
769 - private function addTemplate( $name, $body, $displayAnon, $displayAccount, $fundraising, $landingPages ) {
 775+ private function addTemplate( $name, $body, $displayAnon, $displayAccount, $fundraising,
 776+ $landingPages ) {
 777+
770778 if ( $body == '' || $name == '' ) {
771779 $this->showError( 'centralnotice-null-string' );
772780 return;
@@ -810,7 +818,9 @@
811819 /**
812820 * Update a banner
813821 */
814 - private function editTemplate( $name, $body, $displayAnon, $displayAccount, $fundraising, $landingPages ) {
 822+ private function editTemplate( $name, $body, $displayAnon, $displayAccount, $fundraising,
 823+ $landingPages ) {
 824+
815825 if ( $body == '' || $name == '' ) {
816826 $this->showError( 'centralnotice-null-string' );
817827 return;
@@ -879,7 +889,8 @@
880890 $template_body = Revision::newFromTitle( $bodyPage )->getText();
881891
882892 // 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 ) ) {
884895
885896 // Populate the fields
886897 foreach ( $langs as $lang => $fields ) {

Status & tagging log