Index: trunk/phase3/includes/api/ApiQueryAllCategories.php |
— | — | @@ -66,7 +66,7 @@ |
67 | 67 | |
68 | 68 | $prop = array_flip($params['prop']); |
69 | 69 | $this->addFieldsIf( array( 'cat_pages', 'cat_subcats', 'cat_files' ), isset($prop['size']) ); |
70 | | - //$this->addFieldsIf( 'cat_hidden', isset($prop['hidden']) ); |
| 70 | + $this->addFieldsIf( 'cat_hidden', isset($prop['hidden']) ); |
71 | 71 | |
72 | 72 | $res = $this->select(__METHOD__); |
73 | 73 | |
— | — | @@ -95,9 +95,8 @@ |
96 | 96 | $item['files'] = $row->cat_files; |
97 | 97 | $item['subcats'] = $row->cat_subcats; |
98 | 98 | } |
99 | | - //Isn't populated, so doesn't work |
100 | | - //if( isset( $prop['hidden'] ) && $row->cat_hidden ) |
101 | | - // $item['hidden'] = ''; |
| 99 | + if( isset( $prop['hidden'] ) && $row->cat_hidden ) |
| 100 | + $item['hidden'] = ''; |
102 | 101 | $categories[] = $item; |
103 | 102 | } |
104 | 103 | } |
— | — | @@ -130,7 +129,7 @@ |
131 | 130 | ApiBase :: PARAM_MAX2 => ApiBase :: LIMIT_BIG2 |
132 | 131 | ), |
133 | 132 | 'prop' => array ( |
134 | | - ApiBase :: PARAM_TYPE => array( 'size', /*'hidden'*/ ), |
| 133 | + ApiBase :: PARAM_TYPE => array( 'size', 'hidden' ), |
135 | 134 | ApiBase :: PARAM_DFLT => '', |
136 | 135 | ApiBase :: PARAM_ISMULTI => true |
137 | 136 | ), |
Index: trunk/phase3/includes/api/ApiQueryCategoryInfo.php |
— | — | @@ -55,7 +55,7 @@ |
56 | 56 | } |
57 | 57 | |
58 | 58 | $this->addTables('category'); |
59 | | - $this->addFields(array('cat_title', 'cat_pages', 'cat_subcats', 'cat_files')); |
| 59 | + $this->addFields(array('cat_title', 'cat_pages', 'cat_subcats', 'cat_files', 'cat_hidden')); |
60 | 60 | $this->addWhere(array('cat_title' => $cattitles)); |
61 | 61 | |
62 | 62 | $db = $this->getDB(); |
— | — | @@ -70,6 +70,8 @@ |
71 | 71 | $vals['pages'] = $row->cat_pages - $row->cat_subcats - $row->cat_files; |
72 | 72 | $vals['files'] = $row->cat_files; |
73 | 73 | $vals['subcats'] = $row->cat_subcats; |
| 74 | + if($row->cat_hidden) |
| 75 | + $vals['hidden'] = ''; |
74 | 76 | $this->addPageSubItems($catids[$row->cat_title], $vals); |
75 | 77 | } |
76 | 78 | $db->freeResult($res); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -445,6 +445,7 @@ |
446 | 446 | * (bug 14471) Use HTMLTidy and generate limit report in action=parse |
447 | 447 | * (bug 14459) Added prependtext and appendtext parameters to action=edit |
448 | 448 | * (bug 14526) Unescaped SQL in list=backlinks |
| 449 | +* Added 'hidden' flag to list=allcategories and prop=categoryinfo output |
449 | 450 | |
450 | 451 | === Languages updated in 1.13 === |
451 | 452 | |