r64873 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64872‎ | r64873 | r64874 >
Date:12:29, 10 April 2010
Author:reedy
Status:ok
Tags:
Comment:
Revert r64825
Modified paths:
  • /trunk/phase3/includes/api/ApiUserrights.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiUserrights.php
@@ -40,7 +40,8 @@
4141 $params = $this->extractRequestParams();
4242
4343 // User already validated in call to getTokenSalt from Main
44 - $user = $this->mForm->fetchUser( $params['user'] );
 44+ $form = new UserrightsPage;
 45+ $user = $form->fetchUser( $params['user'] );
4546
4647 $r['user'] = $user->getName();
4748 list( $r['added'], $r['removed'] ) =
@@ -107,8 +108,8 @@
108109 $this->dieUsageMsg( array( 'missingparam', 'user' ) );
109110 }
110111
111 - $this->mForm = new UserrightsPage;
112 - $user = $this->mForm->fetchUser( $params['user'] );
 112+ $form = new UserrightsPage;
 113+ $user = $form->fetchUser( $params['user'] );
113114 if ( $user instanceof WikiErrorMsg ) {
114115 $this->dieUsageMsg( array_merge(
115116 (array)$user->getMessageKey(), $user->getMessageArgs() ) );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r64825Reuse created instance of UserrightsPagereedy20:02, 9 April 2010

Status & tagging log