Index: trunk/extensions/CentralNotice/SpecialNoticeTemplate.php |
— | — | @@ -237,12 +237,9 @@ |
238 | 238 | array( 'style' => 'margin-bottom: 0.2em;' ), |
239 | 239 | '<img src="'.$scriptPath.'/down-arrow.png" style="vertical-align:baseline;"/>' . wfMsg( 'centralnotice-insert', $wgLang->commaList( $buttons ) ) |
240 | 240 | ); |
241 | | - $body = ''; |
242 | 241 | |
243 | 242 | // Restore banner body state in the event of an error on form submit |
244 | | - if ( $wgRequest->getVal( 'templateBody' ) ) { |
245 | | - $body = $wgRequest->getVal( 'templateBody' ); |
246 | | - } |
| 243 | + $body = $wgRequest->getVal( 'templateBody', '' ) |
247 | 244 | |
248 | 245 | $htmlOut .= Xml::textarea( 'templateBody', $body, 60, 20 ); |
249 | 246 | $htmlOut .= Xml::closeElement( 'fieldset' ); |
— | — | @@ -328,9 +325,7 @@ |
329 | 326 | preg_match_all( "/\{\{\{([$allowedChars]+)\}\}\}/u", $body, $fields ); |
330 | 327 | |
331 | 328 | // Restore banner body state in the event of an error on form submit |
332 | | - if ( $wgRequest->getVal( 'templateBody' ) ) { |
333 | | - $body = $wgRequest->getVal( 'templateBody' ); |
334 | | - } |
| 329 | + $body = $wgRequest->getVal( 'templateBody', $body ); |
335 | 330 | |
336 | 331 | // If there are any message fields in the banner, display translation tools. |
337 | 332 | if ( count( $fields[0] ) > 0 ) { |