Add pageid to API parse output
authorGeoffrey Mon <geofbot@gmail.com>
Wed, 29 Jul 2015 12:32:21 +0000 (12:32 +0000)
committerGeoffrey Mon <geofbot@gmail.com>
Thu, 30 Jul 2015 18:19:14 +0000 (18:19 +0000)
Bug: T27134
Change-Id: I4ef765e18020f93d7861e62d20649c89fca0f828

includes/api/ApiParse.php

index 577b525..1b8f6d9 100644 (file)
@@ -260,6 +260,7 @@ class ApiParse extends ApiBase {
                $result_array = array();
 
                $result_array['title'] = $titleObj->getPrefixedText();
+               $result_array['pageid'] = $pageid ? $pageid : $pageObj->getId();
 
                if ( !is_null( $oldid ) ) {
                        $result_array['revid'] = intval( $oldid );