Index: trunk/phase3/includes/api/ApiQueryAllCategories.php |
— | — | @@ -67,7 +67,19 @@ |
68 | 68 | |
69 | 69 | $prop = array_flip($params['prop']); |
70 | 70 | $this->addFieldsIf( array( 'cat_pages', 'cat_subcats', 'cat_files' ), isset($prop['size']) ); |
71 | | - $this->addFieldsIf( 'cat_hidden', isset($prop['hidden']) ); |
| 71 | + if(isset($prop['hidden'])) |
| 72 | + { |
| 73 | + $this->addTables(array('page', 'page_props')); |
| 74 | + $this->addJoinConds(array( |
| 75 | + 'page' => array('LEFT JOIN', array( |
| 76 | + 'page_namespace' => NS_CATEGORY, |
| 77 | + 'page_title=cat_title')), |
| 78 | + 'page_props' => array('LEFT JOIN', array( |
| 79 | + 'pp_page=page_id', |
| 80 | + 'pp_propname' => 'hiddencat')), |
| 81 | + )); |
| 82 | + $this->addFields('pp_propname AS cat_hidden'); |
| 83 | + } |
72 | 84 | |
73 | 85 | $res = $this->select(__METHOD__); |
74 | 86 | |
Index: trunk/phase3/includes/api/ApiQueryCategoryInfo.php |
— | — | @@ -55,8 +55,16 @@ |
56 | 56 | $cattitles[$c] = $t->getDBKey(); |
57 | 57 | } |
58 | 58 | |
59 | | - $this->addTables('category'); |
60 | | - $this->addFields(array('cat_title', 'cat_pages', 'cat_subcats', 'cat_files', 'cat_hidden')); |
| 59 | + $this->addTables(array('category', 'page', 'page_props')); |
| 60 | + $this->addJoinConds(array( |
| 61 | + 'page' => array('LEFT JOIN', array( |
| 62 | + 'page_namespace' => NS_CATEGORY, |
| 63 | + 'page_title=cat_title')), |
| 64 | + 'page_props' => array('LEFT JOIN', array( |
| 65 | + 'pp_page=page_id', |
| 66 | + 'pp_propname' => 'hiddencat')), |
| 67 | + )); |
| 68 | + $this->addFields(array('cat_title', 'cat_pages', 'cat_subcats', 'cat_files', 'pp_propname AS cat_hidden')); |
61 | 69 | $this->addWhere(array('cat_title' => $cattitles)); |
62 | 70 | |
63 | 71 | $db = $this->getDB(); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -516,6 +516,8 @@ |
517 | 517 | protection wasn't allowed |
518 | 518 | * (bug 16626) action=delete now correctly handles empty "reason" param |
519 | 519 | * (bug 15579) clshow considers all categories !hidden |
| 520 | +* (bug 16647) list=allcategories, prop=categories don't return "hidden" |
| 521 | + property for hidden categories |
520 | 522 | |
521 | 523 | === Languages updated in 1.14 === |
522 | 524 | |