r37688 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37687‎ | r37688 | r37689 >
Date:12:35, 15 July 2008
Author:nikerabbit
Status:old
Tags:
Comment:
* Fix notice
Modified paths:
  • /trunk/extensions/Translate/TranslateEditAddons.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/TranslateEditAddons.php
@@ -260,17 +260,19 @@
261261 // Take the contents from edit field as a translation
262262 $message->database = $translation;
263263 $checker = MessageChecks::getInstance();
264 - $checks = $checker->doChecks( $message, $group->getType(), $code );
265 - if ( count($checks) ) {
266 - $checkMessages = array();
267 - foreach ( $checks as $checkParams ) {
268 - array_splice( $checkParams, 1, 0, 'parseinline' );
269 - $checkMessages[] = call_user_func_array( 'wfMsgExt', $checkParams );
 264+ if ( $checker->hasChecks( $type ) ) {
 265+ $checks = $checker->doChecks( $message, $group->getType(), $code );
 266+ if ( count($checks) ) {
 267+ $checkMessages = array();
 268+ foreach ( $checks as $checkParams ) {
 269+ array_splice( $checkParams, 1, 0, 'parseinline' );
 270+ $checkMessages[] = call_user_func_array( 'wfMsgExt', $checkParams );
 271+ }
 272+
 273+ $boxes[] = TranslateUtils::fieldset(
 274+ wfMsgHtml( self::MSG . 'warnings' ), implode( '<hr />', $checkMessages),
 275+ array( 'class' => 'mw-sp-translate-edit-warnings' ) );
270276 }
271 -
272 - $boxes[] = TranslateUtils::fieldset(
273 - wfMsgHtml( self::MSG . 'warnings' ), implode( '<hr />', $checkMessages),
274 - array( 'class' => 'mw-sp-translate-edit-warnings' ) );
275277 }
276278 }
277279

Status & tagging log