output.
* When the limit on multivalue parameters is exceeded, a warning is issued
* list=search doesn't list missing pages any more
+* (bug 15178) Added clshow to prop=categories to allow filtering for hidden/
+ non-hidden categories
=== Languages updated in 1.14 ===
$params = $this->extractRequestParams();
$prop = $params['prop'];
+ $show = array_flip((array)$params['show']);
$this->addFields(array (
'cl_from',
"(cl_from = $clfrom AND ".
"cl_to >= '$clto')");
}
+ if(isset($show['hidden']) && isset($show['!hidden']))
+ $this->dieUsage("Incorrect parameter - mutually exclusive values may not be supplied", 'show');
+ if(isset($show['hidden']) || isset($show['!hidden']))
+ {
+ $this->addTables('category');
+ $this->addWhere(array( 'cl_to = cat_title',
+ 'cat_hidden' => isset($show['hidden'])));
+ }
+
# Don't order by cl_from if it's constant in the WHERE clause
if(count($this->getPageSet()->getGoodTitles()) == 1)
$this->addOption('ORDER BY', 'cl_to');
'timestamp',
)
),
+ 'show' => array(
+ ApiBase :: PARAM_ISMULTI => true,
+ ApiBase :: PARAM_TYPE => array(
+ 'hidden',
+ '!hidden',
+ )
+ ),
'limit' => array(
ApiBase :: PARAM_DFLT => 10,
ApiBase :: PARAM_TYPE => 'limit',
return array (
'prop' => 'Which additional properties to get for each category.',
'limit' => 'How many categories to return',
+ 'show' => 'Which kind of categories to show',
'continue' => 'When more results are available, use this to continue',
);
}