Localisation updates from https://translatewiki.net.
[lhc/web/wiklou.git] / includes / api / ApiQuery.php
index aa0612f..514d559 100644 (file)
@@ -45,6 +45,7 @@ class ApiQuery extends ApiBase {
                'categories' => 'ApiQueryCategories',
                'categoryinfo' => 'ApiQueryCategoryInfo',
                'contributors' => 'ApiQueryContributors',
+               'deletedrevisions' => 'ApiQueryDeletedRevisions',
                'duplicatefiles' => 'ApiQueryDuplicateFiles',
                'extlinks' => 'ApiQueryExternalLinks',
                'fileusage' => 'ApiQueryBacklinksprop',
@@ -69,6 +70,7 @@ class ApiQuery extends ApiBase {
         */
        private static $QueryListModules = array(
                'allcategories' => 'ApiQueryAllCategories',
+               'alldeletedrevisions' => 'ApiQueryAllDeletedRevisions',
                'allfileusages' => 'ApiQueryAllLinks',
                'allimages' => 'ApiQueryAllImages',
                'alllinks' => 'ApiQueryAllLinks',
@@ -247,6 +249,16 @@ class ApiQuery extends ApiBase {
        public function execute() {
                $this->mParams = $this->extractRequestParams();
 
+               if ( $this->mParams['continue'] === null && !$this->mParams['rawcontinue'] ) {
+                       $this->logFeatureUsage( 'action=query&!rawcontinue&!continue' );
+                       $this->setWarning(
+                               'Formatting of continuation data will be changing soon. ' .
+                               'To continue using the current formatting, use the \'rawcontinue\' parameter. ' .
+                               'To begin using the new format, pass an empty string for \'continue\' ' .
+                               'in the initial query.'
+                       );
+               }
+
                // Instantiate requested modules
                $allModules = array();
                $this->instantiateModules( $allModules, 'prop' );
@@ -283,7 +295,7 @@ class ApiQuery extends ApiBase {
                                $cacheMode, $module->getCacheMode( $params ) );
                        $module->profileIn();
                        $module->execute();
-                       wfRunHooks( 'APIQueryAfterExecute', array( &$module ) );
+                       Hooks::run( 'APIQueryAfterExecute', array( &$module ) );
                        $module->profileOut();
                }
 
@@ -425,6 +437,8 @@ class ApiQuery extends ApiBase {
                }
 
                if ( count( $pages ) ) {
+                       $pageSet->populateGeneratorData( $pages );
+
                        if ( $this->mParams['indexpageids'] ) {
                                $pageIDs = array_keys( $pages );
                                // json treats all map keys as strings - converting to match
@@ -597,7 +611,7 @@ class ApiQuery extends ApiBase {
                return true;
        }
 
-       public function getExamplesMessages() {
+       protected function getExamplesMessages() {
                return array(
                        'action=query&prop=revisions&meta=siteinfo&' .
                                'titles=Main%20Page&rvprop=user|comment&continue='