r93095 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93094‎ | r93095 | r93096 >
Date:19:37, 25 July 2011
Author:kaldari
Status:ok
Tags:
Comment:
fix for bug 30057 - expose wpUserLanguage in URL
Modified paths:
  • /trunk/extensions/CentralNotice/special/SpecialNoticeTemplate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/special/SpecialNoticeTemplate.php
@@ -501,8 +501,11 @@
502502 }
503503
504504 // Show language selection form
505 - $htmlOut .= Xml::openElement( 'form', array( 'method' => 'post' ) );
 505+ $actionTitle = $this->getTitleFor( 'NoticeTemplate', 'view' );
 506+ $actionUrl = $actionTitle->getLocalURL();
 507+ $htmlOut .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $actionUrl ) );
506508 $htmlOut .= Xml::fieldset( wfMsg( 'centralnotice-change-lang' ) );
 509+ $htmlOut .= Html::hidden( 'template', $currentTemplate );
507510 $htmlOut .= Xml::openElement( 'table', array ( 'cellpadding' => 9 ) );
508511 list( $lsLabel, $lsSelect ) = Xml::languageSelector( $wpUserLang );
509512
@@ -525,7 +528,6 @@
526529 )
527530 );
528531 $htmlOut .= Xml::closeElement( 'table' );
529 - $htmlOut .= Html::hidden( 'authtoken', $wgUser->editToken() );
530532 $htmlOut .= Xml::closeElement( 'fieldset' );
531533 $htmlOut .= Xml::closeElement( 'form' );
532534 }

Status & tagging log