r71649 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71648‎ | r71649 | r71650 >
Date:19:05, 25 August 2010
Author:kaldari
Status:ok
Tags:
Comment:
additional fix for non-logged-in users
Modified paths:
  • /trunk/extensions/CentralNotice/SpecialNoticeTemplate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/SpecialNoticeTemplate.php
@@ -433,19 +433,24 @@
434434 $htmlOut .= Xml::label( wfMsg( 'centralnotice-banner-logged-in' ), 'displayAccount' );
435435 $htmlOut .= Xml::closeElement( 'p' );
436436 $htmlOut .= Xml::closeElement( 'fieldset' );
437 -
438 - $htmlOut .= Xml::fieldset( wfMsg( 'centralnotice-edit-template' ) );
439 - $htmlOut .= wfMsg( 'centralnotice-edit-template-summary' );
440 - $buttons = array();
441 - $buttons[] = '<a href="#" onclick="insertButton(\'hide\');return false;">' . wfMsg( 'centralnotice-hide-button' ) . '</a>';
442 - $buttons[] = '<a href="#" onclick="insertButton(\'translate\');return false;">' . wfMsg( 'centralnotice-translate-button' ) . '</a>';
443 - $htmlOut .= Xml::tags( 'div',
444 - array( 'style' => 'margin-bottom: 0.2em;' ),
445 - '<img src="'.$scriptPath.'/down-arrow.png" style="vertical-align:baseline;"/>' . wfMsg( 'centralnotice-insert', $wgLang->commaList( $buttons ) )
446 - );
447 - $htmlOut .= Xml::textarea( 'templateBody', $body, 60, 20, $readonly );
448 - $htmlOut .= Xml::closeElement( 'fieldset' );
449437 if ( $this->editable ) {
 438+ $htmlOut .= Xml::fieldset( wfMsg( 'centralnotice-edit-template' ) );
 439+ $htmlOut .= wfMsg( 'centralnotice-edit-template-summary' );
 440+ $buttons = array();
 441+ $buttons[] = '<a href="#" onclick="insertButton(\'hide\');return false;">' . wfMsg( 'centralnotice-hide-button' ) . '</a>';
 442+ $buttons[] = '<a href="#" onclick="insertButton(\'translate\');return false;">' . wfMsg( 'centralnotice-translate-button' ) . '</a>';
 443+ $htmlOut .= Xml::tags( 'div',
 444+ array( 'style' => 'margin-bottom: 0.2em;' ),
 445+ '<img src="'.$scriptPath.'/down-arrow.png" style="vertical-align:baseline;"/>' . wfMsg( 'centralnotice-insert', $wgLang->commaList( $buttons ) )
 446+ );
 447+ $htmlOut .= Xml::textarea( 'templateBody', $body, 60, 20, $readonly );
 448+ $htmlOut .= Xml::closeElement( 'fieldset' );
 449+ } else {
 450+ $htmlOut .= Xml::fieldset( wfMsg( 'centralnotice-banner' ) );
 451+ $htmlOut .= Xml::textarea( 'templateBody', $body, 60, 20, $readonly );
 452+ $htmlOut .= Xml::closeElement( 'fieldset' );
 453+ }
 454+ if ( $this->editable ) {
450455 $htmlOut .= Xml::hidden( 'authtoken', $wgUser->editToken() );
451456 $htmlOut .= Xml::tags( 'div',
452457 array( 'class' => 'cn-buttons' ),

Status & tagging log