Missing pages in prop=langlinks and prop=extlinks are now handled properly. (bug...
[lhc/web/wiklou.git] / includes / api / ApiQueryLangLinks.php
index 62c0fed..d274d61 100644 (file)
@@ -40,6 +40,9 @@ class ApiQueryLangLinks extends ApiQueryBase {
        }
 
        public function execute() {
+               if ( $this->getPageSet()->getGoodTitleCount() == 0 )
+                       return;
+       
                $this->addFields(array (
                        'll_from',
                        'll_lang',
@@ -76,15 +79,7 @@ class ApiQueryLangLinks extends ApiQueryBase {
                $db->freeResult($res);
        }
 
-       private function addPageSubItems($pageId, $data) {
-               $result = $this->getResult();
-               $result->setIndexedTagName($data, 'll');
-               $result->addValue(array ('query', 'pages', intval($pageId)),
-                       'langlinks',
-                       $data);
-       }
-
-       protected function getDescription() {
+       public function getDescription() {
                return 'Returns all interlanguage links from the given page(s)';
        }
 
@@ -99,4 +94,4 @@ class ApiQueryLangLinks extends ApiQueryBase {
                return __CLASS__ . ': $Id$';
        }
 }
-?>
+