Merge "Removed old HTMLCacheUpdateJob b/c code"
[lhc/web/wiklou.git] / includes / api / ApiQueryUsers.php
index 6d14523..52636cc 100644 (file)
@@ -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',