X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryUsers.php;h=52636ccdd62f8d570217be008b89319e7fd3e125;hb=2086cd118020f6388d7b6952ac2d9e2b55e6ef1f;hp=6d145234e33be8d4e751c5ee78fbe55cc7b9fded;hpb=30cc068774d9de3af900af70d00126f9be721773;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryUsers.php b/includes/api/ApiQueryUsers.php index 6d145234e3..52636ccdd6 100644 --- a/includes/api/ApiQueryUsers.php +++ b/includes/api/ApiQueryUsers.php @@ -67,15 +67,16 @@ class ApiQueryUsers extends ApiQueryBase { return $this->tokenFunctions; } - // If we're in JSON callback mode, no tokens can be obtained - if ( !is_null( $this->getMain()->getRequest()->getVal( 'callback' ) ) ) { + // If we're in a mode that breaks the same-origin policy, no tokens can + // be obtained + if ( $this->lacksSameOriginSecurity() ) { return array(); } $this->tokenFunctions = array( 'userrights' => array( 'ApiQueryUsers', 'getUserrightsToken' ), ); - wfRunHooks( 'APIQueryUsersTokens', array( &$this->tokenFunctions ) ); + Hooks::run( 'APIQueryUsersTokens', array( &$this->tokenFunctions ) ); return $this->tokenFunctions; } @@ -314,7 +315,7 @@ class ApiQueryUsers extends ApiQueryBase { ); } - public function getExamplesMessages() { + protected function getExamplesMessages() { return array( 'action=query&list=users&ususers=Example&usprop=groups|editcount|gender' => 'apihelp-query+users-example-simple',