API: Avoid unstubbing User for language pref when not needed
[lhc/web/wiklou.git] / includes / api / ApiQueryRevisions.php
index 2e980f3..7092fc4 100644 (file)
@@ -61,7 +61,7 @@ class ApiQueryRevisions extends ApiQueryRevisionsBase {
                $this->tokenFunctions = array(
                        'rollback' => array( 'ApiQueryRevisions', 'getRollbackToken' )
                );
-               wfRunHooks( 'APIQueryRevisionsTokens', array( &$this->tokenFunctions ) );
+               Hooks::run( 'APIQueryRevisionsTokens', array( &$this->tokenFunctions ) );
 
                return $this->tokenFunctions;
        }
@@ -167,7 +167,7 @@ class ApiQueryRevisions extends ApiQueryRevisionsBase {
                        $this->addWhereFld( 'ct_tag', $params['tag'] );
                }
 
-               if ( $this->fld_content || !is_null( $this->diffto ) || !is_null( $this->difftotext ) ) {
+               if ( $this->fetchContent ) {
                        // For each page we will request, the user must have read rights for that page
                        $user = $this->getUser();
                        /** @var $title Title */