summaryrefslogtreecommitdiff
path: root/includes/api/ApiQueryIWBacklinks.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/api/ApiQueryIWBacklinks.php')
-rw-r--r--includes/api/ApiQueryIWBacklinks.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/includes/api/ApiQueryIWBacklinks.php b/includes/api/ApiQueryIWBacklinks.php
index 6958a253..1a8e9720 100644
--- a/includes/api/ApiQueryIWBacklinks.php
+++ b/includes/api/ApiQueryIWBacklinks.php
@@ -48,6 +48,10 @@ class ApiQueryIWBacklinks extends ApiQueryGeneratorBase {
$this->run( $resultPageSet );
}
+ /**
+ * @param $resultPageSet ApiPageSet
+ * @return void
+ */
public function run( $resultPageSet = null ) {
$params = $this->extractRequestParams();
@@ -115,11 +119,10 @@ class ApiQueryIWBacklinks extends ApiQueryGeneratorBase {
if ( !is_null( $resultPageSet ) ) {
$pages[] = Title::newFromRow( $row );
} else {
- $entry = array();
+ $entry = array( 'pageid' => $row->page_id );
- $entry['pageid'] = intval( $row->page_id );
- $entry['ns'] = intval( $row->page_namespace );
- $entry['title'] = $row->page_title;
+ $title = Title::makeTitle( $row->page_namespace, $row->page_title );
+ ApiQueryBase::addTitleInfo( $entry, $title );
if ( $row->page_is_redirect ) {
$entry['redirect'] = '';
@@ -212,6 +215,6 @@ class ApiQueryIWBacklinks extends ApiQueryGeneratorBase {
}
public function getVersion() {
- return __CLASS__ . ': $Id: ApiQueryIWBacklinks.php 70647 2010-08-07 19:59:42Z ialex $';
+ return __CLASS__ . ': $Id: ApiQueryIWBacklinks.php 84257 2011-03-18 19:15:33Z reedy $';
}
}