Trivial bug in new apihighlimit feature
[lhc/web/wiklou.git] / includes / api / ApiQueryLinks.php
index f5c34c9..e3a4027 100644 (file)
@@ -102,9 +102,8 @@ class ApiQueryLinks extends ApiQueryGeneratorBase {
                                        $lastId = $row->pl_from;
                                }
 
-                               $title = Title :: makeTitle($row->pl_namespace, $row->pl_title);
                                $vals = array();
-                               ApiQueryBase :: addTitleInfo($vals, $title, true);
+                               ApiQueryBase :: addTitleInfo($vals, Title :: makeTitle($row->pl_namespace, $row->pl_title));
                                $data[] = $vals;
                        }
 
@@ -116,9 +115,7 @@ class ApiQueryLinks extends ApiQueryGeneratorBase {
 
                        $titles = array();
                        while ($row = $db->fetchObject($res)) {
-                               $title = Title :: makeTitle($row->pl_namespace, $row->pl_title);
-                               if($title->userCanRead())
-                                       $titles[] = $title;
+                               $titles[] = Title :: makeTitle($row->pl_namespace, $row->pl_title);
                        }
                        $resultPageSet->populateFromTitles($titles);
                }
@@ -126,14 +123,6 @@ class ApiQueryLinks extends ApiQueryGeneratorBase {
                $db->freeResult($res);
        }
 
-       private function addPageSubItems($pageId, $data) {
-               $result = $this->getResult();
-               $result->setIndexedTagName($data, $this->prefix);
-               $result->addValue(array ('query', 'pages', intval($pageId)),
-                       $this->getModuleName(),
-                       $data);
-       }
-
        protected function getAllowedParams()
        {
                return array(
@@ -170,4 +159,4 @@ class ApiQueryLinks extends ApiQueryGeneratorBase {
                return __CLASS__ . ': $Id$';
        }
 }
-?>
+