Kunalgrover05 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/135380

Change subject: Added API method for getting page content language API method 
to get page content language from database
......................................................................

Added API method for getting page content language
API method to get page content language from database

Change-Id: If08624eca6705199922f53890dc67069758ddf1f
---
M includes/api/ApiQueryInfo.php
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/80/135380/1

diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php
index f160791..2b426f5 100644
--- a/includes/api/ApiQueryInfo.php
+++ b/includes/api/ApiQueryInfo.php
@@ -40,7 +40,7 @@
        private $params, $titles, $missing, $everything, $pageCounter;
 
        private $pageRestrictions, $pageIsRedir, $pageIsNew, $pageTouched,
-               $pageLatest, $pageLength;
+               $pageLatest, $pageLength, $pageLanguage;
 
        private $protections, $watched, $watchers, $notificationtimestamps,
                $talkids, $subjectids, $displaytitles;
@@ -71,6 +71,7 @@
                $pageSet->requestField( 'page_touched' );
                $pageSet->requestField( 'page_latest' );
                $pageSet->requestField( 'page_len' );
+               $pageSet->requestField( 'page_lang' );
                if ( $wgContentHandlerUseDB ) {
                        $pageSet->requestField( 'page_content_model' );
                }
@@ -303,6 +304,7 @@
                $this->pageTouched = $pageSet->getCustomField( 'page_touched' );
                $this->pageLatest = $pageSet->getCustomField( 'page_latest' );
                $this->pageLength = $pageSet->getCustomField( 'page_len' );
+               $this->pageLanguage = $pageSet->getCustomField( 'page_lang' );
 
                // Get protection info if requested
                if ( $this->fld_protection ) {
@@ -836,6 +838,7 @@
                                        ApiBase::PROP_NULLABLE => true
                                ),
                                'contentmodel' => 'string',
+                               'pagelanguage' => 'string',
                        ),
                        'watched' => array(
                                'watched' => 'boolean'
@@ -876,7 +879,7 @@
                        ),
                        'displaytitle' => array(
                                'displaytitle' => 'string'
-                       )
+                       ),
                );
 
                self::addTokenProperties( $props, $this->getTokenFunctions() );

-- 
To view, visit https://gerrit.wikimedia.org/r/135380
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If08624eca6705199922f53890dc67069758ddf1f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Kunalgrover05 <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to