r111356 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111355‎ | r111356 | r111357 >
Date:09:56, 13 February 2012
Author:nikerabbit
Status:ok
Tags:
Comment:
editToken is deprecated
Modified paths:
  • /trunk/extensions/Translate/specials/SpecialManageGroups.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/specials/SpecialManageGroups.php
@@ -164,10 +164,18 @@
165165 'action' => $this->getTitle()->getLocalURL() . '#mw-group-' . $group->getId(),
166166 );
167167
 168+ $user = $this->user;
 169+ // BC <1.19
 170+ if ( method_exists( $user, 'getEditToken' ) ) {
 171+ $token = $user->getEditToken();
 172+ } else {
 173+ $token = $user->editToken();
 174+ }
 175+
168176 $html =
169177 Xml::openElement( 'form', $formParams ) .
170178 Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
171 - Html::hidden( 'token', $this->user->editToken() ) .
 179+ Html::hidden( 'token', $token ) .
172180 Html::hidden( 'group', $group->getId() ) .
173181 Html::hidden( 'codes', implode( ',', $codes ) ) .
174182 Html::hidden( 'rebuildall', 1 ) .

Follow-up revisions

RevisionCommit summaryAuthorDate
r111357editToken is deprecatednikerabbit10:01, 13 February 2012

Status & tagging log