r70442 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70441‎ | r70442 | r70443 >
Date:00:26, 4 August 2010
Author:kaldari
Status:ok
Tags:
Comment:
Better fix for r70440. Actually it looks like the old token stuff was left over from previous auth scheme
Modified paths:
  • /trunk/extensions/CentralNotice/SpecialNoticeTemplate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/SpecialNoticeTemplate.php
@@ -54,13 +54,12 @@
5555
5656 // Handle translation message update
5757 $update = $wgRequest->getArray( 'updateText' );
58 - $token = $wgRequest->getArray( 'token' );
5958 if ( isset ( $update ) ) {
6059 foreach ( $update as $lang => $messages ) {
6160 foreach ( $messages as $text => $translation ) {
6261 // If we actually have text
6362 if ( $translation ) {
64 - $this->updateMessage( $text, $translation, $lang, $token );
 63+ $this->updateMessage( $text, $translation, $lang );
6564 }
6665 }
6766 }
@@ -216,9 +215,6 @@
217216 $readonly = array( 'readonly' => 'readonly' );
218217 }
219218
220 - // Get token
221 - $token = $wgUser->editToken();
222 -
223219 // Get user's language
224220 $wpUserLang = $wgRequest->getVal( 'wpUserLanguage' ) ? $wgRequest->getVal( 'wpUserLanguage' ) : $wgContLanguageCode;
225221
@@ -335,7 +331,6 @@
336332 $htmlOut .= Xml::closeElement( 'tr' );
337333 }
338334 if ( $this->editable ) {
339 - $htmlOut .= Xml::hidden( 'token', $token );
340335 $htmlOut .= Xml::hidden( 'wpUserLanguage', $wpUserLang );
341336 $htmlOut .= Xml::openElement( 'tr' );
342337 $htmlOut .= Xml::tags( 'td', array( 'colspan' => 4 ),
@@ -481,7 +476,7 @@
482477 return $wgOut->addHtml( $htmlOut );
483478 }
484479
485 - private function updateMessage( $text, $translation, $lang, $token = false ) {
 480+ private function updateMessage( $text, $translation, $lang ) {
486481 $title = Title::newFromText(
487482 ( $lang == 'en' ) ? "Centralnotice-{$text}" : "Centralnotice-{$text}/{$lang}",
488483 NS_MEDIAWIKI

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70440Fix for form issueskaldari00:05, 4 August 2010

Status & tagging log