Index: trunk/phase3/includes/api/ApiUserrights.php |
— | — | @@ -40,8 +40,7 @@ |
41 | 41 | $params = $this->extractRequestParams(); |
42 | 42 | |
43 | 43 | // User already validated in call to getTokenSalt from Main |
44 | | - $form = new UserrightsPage; |
45 | | - $user = $form->fetchUser( $params['user'] ); |
| 44 | + $user = $this->mForm->fetchUser( $params['user'] ); |
46 | 45 | |
47 | 46 | $r['user'] = $user->getName(); |
48 | 47 | list( $r['added'], $r['removed'] ) = |
— | — | @@ -108,8 +107,8 @@ |
109 | 108 | $this->dieUsageMsg( array( 'missingparam', 'user' ) ); |
110 | 109 | } |
111 | 110 | |
112 | | - $form = new UserrightsPage; |
113 | | - $user = $form->fetchUser( $params['user'] ); |
| 111 | + $this->mForm = new UserrightsPage; |
| 112 | + $user = $this->mForm->fetchUser( $params['user'] ); |
114 | 113 | if ( $user instanceof WikiErrorMsg ) { |
115 | 114 | $this->dieUsageMsg( array_merge( |
116 | 115 | (array)$user->getMessageKey(), $user->getMessageArgs() ) ); |