Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F5131
x2.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
•
bzimport
Nov 21 2014, 10:19 PM
2014-11-21 22:19:42 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
x2.diff
View Options
Index: includes/api/ApiQueryCategories.php
===================================================================
--- includes/api/ApiQueryCategories.php (revision 44583)
+++ includes/api/ApiQueryCategories.php (working copy)
@@ -96,9 +96,15 @@
$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'])));
+ $this->addOption('STRAIGHT_JOIN');
+ $this->addTables(array('page', 'page_props'));
+ $this->addJoinConds(array(
+ 'page' => array('LEFT JOIN', 'page_namespace=14 AND page_title=cl_to'),
+ 'page_props' => array('LEFT JOIN', 'pp_page=page_id AND pp_propname=\'hiddencat\'')));
+ if(isset($show['hidden']))
+ $this->addWhere(array('pp_propname IS NOT NULL'));
+ else
+ $this->addWhere(array('pp_propname IS NULL'));
}
# Don't order by cl_from if it's constant in the WHERE clause
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4694
Default Alt Text
x2.diff (1 KB)
Attached To
Mode
T17579: clshow considers all categories !hidden
Attached
Detach File
Event Timeline
Log In to Comment