protection wasn't allowed
* (bug 16626) action=delete now correctly handles empty "reason" param
* (bug 15579) clshow considers all categories !hidden
+* (bug 16647) list=allcategories, prop=categories don't return "hidden"
+ property for hidden categories
=== Languages updated in 1.14 ===
$prop = array_flip($params['prop']);
$this->addFieldsIf( array( 'cat_pages', 'cat_subcats', 'cat_files' ), isset($prop['size']) );
- $this->addFieldsIf( 'cat_hidden', isset($prop['hidden']) );
+ if(isset($prop['hidden']))
+ {
+ $this->addTables(array('page', 'page_props'));
+ $this->addJoinConds(array(
+ 'page' => array('LEFT JOIN', array(
+ 'page_namespace' => NS_CATEGORY,
+ 'page_title=cat_title')),
+ 'page_props' => array('LEFT JOIN', array(
+ 'pp_page=page_id',
+ 'pp_propname' => 'hiddencat')),
+ ));
+ $this->addFields('pp_propname AS cat_hidden');
+ }
$res = $this->select(__METHOD__);
$cattitles[$c] = $t->getDBKey();
}
- $this->addTables('category');
- $this->addFields(array('cat_title', 'cat_pages', 'cat_subcats', 'cat_files', 'cat_hidden'));
+ $this->addTables(array('category', 'page', 'page_props'));
+ $this->addJoinConds(array(
+ 'page' => array('LEFT JOIN', array(
+ 'page_namespace' => NS_CATEGORY,
+ 'page_title=cat_title')),
+ 'page_props' => array('LEFT JOIN', array(
+ 'pp_page=page_id',
+ 'pp_propname' => 'hiddencat')),
+ ));
+ $this->addFields(array('cat_title', 'cat_pages', 'cat_subcats', 'cat_files', 'pp_propname AS cat_hidden'));
$this->addWhere(array('cat_title' => $cattitles));
$db = $this->getDB();