| @@ 224-234 (lines=11) @@ | ||
| 221 | ); |
|
| 222 | } |
|
| 223 | ||
| 224 | if ( !is_null( $params['token'] ) ) { |
|
| 225 | $tokenFunctions = $this->getTokenFunctions(); |
|
| 226 | foreach ( $params['token'] as $t ) { |
|
| 227 | $val = call_user_func( $tokenFunctions[$t], $user ); |
|
| 228 | if ( $val === false ) { |
|
| 229 | $this->setWarning( "Action '$t' is not allowed for the current user" ); |
|
| 230 | } else { |
|
| 231 | $data[$name][$t . 'token'] = $val; |
|
| 232 | } |
|
| 233 | } |
|
| 234 | } |
|
| 235 | } |
|
| 236 | } |
|
| 237 | ||
| @@ 250-261 (lines=12) @@ | ||
| 247 | if ( $iwUser instanceof UserRightsProxy ) { |
|
| 248 | $data[$u]['interwiki'] = true; |
|
| 249 | ||
| 250 | if ( !is_null( $params['token'] ) ) { |
|
| 251 | $tokenFunctions = $this->getTokenFunctions(); |
|
| 252 | ||
| 253 | foreach ( $params['token'] as $t ) { |
|
| 254 | $val = call_user_func( $tokenFunctions[$t], $iwUser ); |
|
| 255 | if ( $val === false ) { |
|
| 256 | $this->setWarning( "Action '$t' is not allowed for the current user" ); |
|
| 257 | } else { |
|
| 258 | $data[$u][$t . 'token'] = $val; |
|
| 259 | } |
|
| 260 | } |
|
| 261 | } |
|
| 262 | } else { |
|
| 263 | $data[$u]['missing'] = true; |
|
| 264 | if ( isset( $this->prop['cancreate'] ) && !$this->getConfig()->get( 'DisableAuthManager' ) ) { |
|