* (bug 32688) Paraminfo for parameter "generator" of the query module shows too many...
authorSam Reed <reedy@users.mediawiki.org>
Mon, 28 Nov 2011 20:35:32 +0000 (20:35 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Mon, 28 Nov 2011 20:35:32 +0000 (20:35 +0000)
Pass prop and list through the generator filtering in the constructor

RELEASE-NOTES-1.19
includes/api/ApiQuery.php

index 7620f2b..c7d2338 100644 (file)
@@ -183,8 +183,10 @@ production.
 * (bug 7304) Links on redirect pages no longer cause the redirect page to show
   up as a redirect to the linked page on Special:Whatlinkshere.
 * (bug 32609) API: Move captchaid/captchaword of action=edit from core
-  to Captcha extension(s)
+  to Captcha extension(s).
 * Added 'ApiGetDescription' hook.
+* (bug 32688) Paraminfo for parameter "generator" of the query module shows too
+  many types
 
 === Languages updated in 1.19 ===
 
index 83f1542..b3be027 100644 (file)
@@ -101,6 +101,8 @@ class ApiQuery extends ApiBase {
        private $mSlaveDB = null;
        private $mNamedDB = array();
 
+       protected $mAllowedGenerators = array();
+
        public function __construct( $main, $action ) {
                parent::__construct( $main, $action );
 
@@ -114,9 +116,8 @@ class ApiQuery extends ApiBase {
                $this->mListModuleNames = array_keys( $this->mQueryListModules );
                $this->mMetaModuleNames = array_keys( $this->mQueryMetaModules );
 
-               // Allow the entire list of modules at first,
-               // but during module instantiation check if it can be used as a generator.
-               $this->mAllowedGenerators = array_merge( $this->mListModuleNames, $this->mPropModuleNames );
+               $this->makeHelpMsgHelper( $this->mQueryPropModules, 'prop' );
+               $this->makeHelpMsgHelper( $this->mQueryListModules, 'list' );
        }
 
        /**
@@ -631,6 +632,9 @@ class ApiQuery extends ApiBase {
                $moduleDescriptions = array();
 
                foreach ( $moduleList as $moduleName => $moduleClass ) {
+                       /**
+                        * @var $module ApiQueryBase
+                        */
                        $module = new $moduleClass( $this, $moduleName, null );
 
                        $msg = ApiMain::makeHelpMsgHeader( $module, $paramName );