r71930 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71929‎ | r71930 | r71931 >
Date:09:11, 30 August 2010
Author:nikerabbit
Status:ok
Tags:
Comment:
Apply the name/id fix from MessageWebImporter to here too
Modified paths:
  • /trunk/extensions/Translate/SpecialManageGroups.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/SpecialManageGroups.php
@@ -220,18 +220,14 @@
221221 $changed[] = '<ul>';
222222 }
223223
224 - $requestKey = str_replace( '.', '_', $key );
225 - $requestKey = str_replace( ' ', '_', $key );
226 - $action = $wgRequest->getVal( "action-$type-$key" );
 224+ $action = $wgRequest->getVal( MessageWebImporter::escapeNameForPHP( "action-$type-$key" ) );
227225
228226 if ( $action === null ) {
229 - $message = wfMsgExt( 'translate-manage-inconsistent', 'parseinline', wfEscapeWikiText( "action-$type-$requestKey" ) );
 227+ $message = wfMsgExt( 'translate-manage-inconsistent', 'parseinline', wfEscapeWikiText( "action-$type-$key" ) );
230228 $changed[] = "<li>$message</li></ul>";
231229 $process = false;
232230 } else {
233 - /**
234 - * Check processing time.
235 - */
 231+ // Initialise processing time counter.
236232 if ( !isset( $this->time ) ) {
237233 $this->time = wfTimestamp();
238234 }
@@ -274,7 +270,9 @@
275271
276272 foreach ( $actions as $action ) {
277273 $label = wfMsg( "translate-manage-action-$action" );
278 - $act[] = Xml::radioLabel( $label, "action-$type-$key", $action, "action-$key-$action", $action === $defaction );
 274+ $name = self::escapeNameForPHP( "action-$type-$key" );
 275+ $id = Sanitizer::escapeId( "action-$key-$action" );
 276+ $act[] = Xml::radioLabel( $label, $name, $action, $id, $action === $defaction );
279277 }
280278
281279 $name = wfMsg( 'translate-manage-import-diff',

Status & tagging log