r104480 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104479‎ | r104480 | r104481 >
Date:20:35, 28 November 2011
Author:reedy
Status:ok
Tags:
Comment:
* (bug 32688) Paraminfo for parameter "generator" of the query module shows too many types

Pass prop and list through the generator filtering in the constructor
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/api/ApiQuery.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -183,8 +183,10 @@
184184 * (bug 7304) Links on redirect pages no longer cause the redirect page to show
185185 up as a redirect to the linked page on Special:Whatlinkshere.
186186 * (bug 32609) API: Move captchaid/captchaword of action=edit from core
187 - to Captcha extension(s)
 187+ to Captcha extension(s).
188188 * Added 'ApiGetDescription' hook.
 189+* (bug 32688) Paraminfo for parameter "generator" of the query module shows too
 190+ many types
189191
190192 === Languages updated in 1.19 ===
191193
Index: trunk/phase3/includes/api/ApiQuery.php
@@ -101,6 +101,8 @@
102102 private $mSlaveDB = null;
103103 private $mNamedDB = array();
104104
 105+ protected $mAllowedGenerators = array();
 106+
105107 public function __construct( $main, $action ) {
106108 parent::__construct( $main, $action );
107109
@@ -114,9 +116,8 @@
115117 $this->mListModuleNames = array_keys( $this->mQueryListModules );
116118 $this->mMetaModuleNames = array_keys( $this->mQueryMetaModules );
117119
118 - // Allow the entire list of modules at first,
119 - // but during module instantiation check if it can be used as a generator.
120 - $this->mAllowedGenerators = array_merge( $this->mListModuleNames, $this->mPropModuleNames );
 120+ $this->makeHelpMsgHelper( $this->mQueryPropModules, 'prop' );
 121+ $this->makeHelpMsgHelper( $this->mQueryListModules, 'list' );
121122 }
122123
123124 /**
@@ -631,6 +632,9 @@
632633 $moduleDescriptions = array();
633634
634635 foreach ( $moduleList as $moduleName => $moduleClass ) {
 636+ /**
 637+ * @var $module ApiQueryBase
 638+ */
635639 $module = new $moduleClass( $this, $moduleName, null );
636640
637641 $msg = ApiMain::makeHelpMsgHeader( $module, $paramName );

Status & tagging log