}
/**
- * Query module to enumerate all available pages.
+ * Query module to enumerate links from all pages together.
*
* @addtogroup API
*/
$db = $this->getDB();
$params = $this->extractRequestParams();
- $this->debugPrint($params);
$prop = array_flip($params['prop']);
$fld_ids = isset($prop['ids']);
}
if (is_null($resultPageSet)) {
- $title = Title :: makeTitle($row->pl_namespace, $row->pl_title);
- if ($title->userCanRead()) {
- $vals = array();
- if ($fld_ids)
- $vals['fromid'] = intval($row->pl_from);
- if ($fld_title) {
- $vals['ns'] = intval($title->getNamespace());
- $vals['title'] = $title->getPrefixedText();
- }
- $data[] = $vals;
+ $vals = array();
+ if ($fld_ids)
+ $vals['fromid'] = intval($row->pl_from);
+ if ($fld_title) {
+ $title = Title :: makeTitle($row->pl_namespace, $row->pl_title);
+ $vals['ns'] = intval($title->getNamespace());
+ $vals['title'] = $title->getPrefixedText();
}
+ $data[] = $vals;
} else {
$pageids[] = $row->pl_from;
}
'from' => 'The page title to start enumerating from.',
'prefix' => 'Search for all page titles that begin with this value.',
'unique' => 'Only show unique links. Cannot be used with generator or prop=ids',
+ 'prop' => 'What pieces of information to include',
'namespace' => 'The namespace to enumerate.',
'limit' => 'How many total links to return.'
);
}
protected function getDescription() {
- return 'Enumerate all pages sequentially in a given namespace';
+ return 'Enumerate all links that point to a given namespace';
}
protected function getExamples() {