Return the page_id in list=iwbacklinks as an int rather than string
[lhc/web/wiklou.git] / includes / api / ApiQueryIWBacklinks.php
index 6e2fb67..83801c7 100644 (file)
@@ -2,8 +2,6 @@
 /**
  * API for MediaWiki 1.17+
  *
- * Created on May 14, 2010
- *
  * Copyright © 2010 Sam Reed
  * Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
  *
@@ -133,7 +131,7 @@ class ApiQueryIWBacklinks extends ApiQueryGeneratorBase {
                        if ( !is_null( $resultPageSet ) ) {
                                $pages[] = Title::newFromRow( $row );
                        } else {
-                               $entry = [ 'pageid' => $row->page_id ];
+                               $entry = [ 'pageid' => (int)$row->page_id ];
 
                                $title = Title::makeTitle( $row->page_namespace, $row->page_title );
                                ApiQueryBase::addTitleInfo( $entry, $title );
@@ -215,6 +213,6 @@ class ApiQueryIWBacklinks extends ApiQueryGeneratorBase {
        }
 
        public function getHelpUrls() {
-               return 'https://www.mediawiki.org/wiki/API:Iwbacklinks';
+               return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Iwbacklinks';
        }
 }