API:
[lhc/web/wiklou.git] / includes / api / ApiQueryCategories.php
index 2da8b20..2283a8b 100644 (file)
@@ -95,11 +95,9 @@ class ApiQueryCategories extends ApiQueryGeneratorBase {
                                }
                                
                                $title = Title :: makeTitle(NS_CATEGORY, $row->cl_to);
-                               // do not check userCanRead() -- page content is already accessible,
-                               // and category is listed there.
                                
                                $vals = array();
-                               ApiQueryBase :: addTitleInfo($vals, $title, true);
+                               ApiQueryBase :: addTitleInfo($vals, $title);
                                if ($fld_sortkey)
                                        $vals['sortkey'] = $row->cl_sortkey;
 
@@ -114,9 +112,7 @@ class ApiQueryCategories extends ApiQueryGeneratorBase {
 
                        $titles = array();
                        while ($row = $db->fetchObject($res)) {
-                               $title = Title :: makeTitle(NS_CATEGORY, $row->cl_to);
-                               if($title->userCanRead())
-                                       $titles[] = $title;
+                               $titles[] = Title :: makeTitle(NS_CATEGORY, $row->cl_to);
                        }
                        $resultPageSet->populateFromTitles($titles);
                }