Merge "Misc fixes in RevisionDelete.php."
[lhc/web/wiklou.git] / includes / api / ApiQuery.php
index b3be027..866b71c 100644 (file)
@@ -64,8 +64,8 @@ class ApiQuery extends ApiBase {
        );
 
        private $mQueryListModules = array(
-               'allimages' => 'ApiQueryAllimages',
-               'allpages' => 'ApiQueryAllpages',
+               'allimages' => 'ApiQueryAllImages',
+               'allpages' => 'ApiQueryAllPages',
                'alllinks' => 'ApiQueryAllLinks',
                'allcategories' => 'ApiQueryAllCategories',
                'allusers' => 'ApiQueryAllUsers',
@@ -95,7 +95,7 @@ class ApiQuery extends ApiBase {
        private $mQueryMetaModules = array(
                'siteinfo' => 'ApiQuerySiteinfo',
                'userinfo' => 'ApiQueryUserInfo',
-               'allmessages' => 'ApiQueryAllmessages',
+               'allmessages' => 'ApiQueryAllMessages',
        );
 
        private $mSlaveDB = null;
@@ -135,7 +135,7 @@ class ApiQuery extends ApiBase {
 
        /**
         * Gets a default slave database connection object
-        * @return Database
+        * @return DatabaseBase
         */
        public function getDB() {
                if ( !isset( $this->mSlaveDB ) ) {
@@ -154,7 +154,7 @@ class ApiQuery extends ApiBase {
         * @param $name string Name to assign to the database connection
         * @param $db int One of the DB_* constants
         * @param $groups array Query groups
-        * @return Database
+        * @return DatabaseBase
         */
        public function getNamedDB( $name, $db, $groups ) {
                if ( !array_key_exists( $name, $this->mNamedDB ) ) {
@@ -483,7 +483,7 @@ class ApiQuery extends ApiBase {
                $titles = $pageSet->getGoodTitles();
                if ( count( $titles ) ) {
                        foreach ( $titles as $title ) {
-                               if ( $title->userCanRead() ) {
+                               if ( $title->userCan( 'read' ) ) {
                                        $exportTitles[] = $title;
                                }
                        }
@@ -674,7 +674,7 @@ class ApiQuery extends ApiBase {
                                        'NOTE: generator parameter names must be prefixed with a \'g\', see examples' ),
                        'redirects' => 'Automatically resolve redirects',
                        'converttitles' => array( "Convert titles to other variants if necessary. Only works if the wiki's content language supports variant conversion.",
-                                       'Languages that support variant conversion include kk, ku, gan, tg, sr, zh' ),
+                                       'Languages that support variant conversion include gan, iu, kk, ku, shi, sr, tg, zh' ),
                        'indexpageids' => 'Include an additional pageids section listing all returned page IDs',
                        'export' => 'Export the current revisions of all given or generated pages',
                        'exportnowrap' => 'Return the export XML without wrapping it in an XML result (same format as Special:Export). Can only be used with export',