[MediaWiki-commits] [Gerrit] Add page language to prop=info - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/64512 Change subject: Add page language to prop=info .. Add page language to prop=info This can be useful to determine the language of a page, for example javascript has english as page language. MediaWiki pages has it page language corresponding to the lang code in the sub page. Change-Id: Idd0412574b314ecf52d92243a3f8a08755474663 --- M RELEASE-NOTES-1.22 M includes/api/ApiQueryInfo.php 2 files changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/12/64512/1 diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index 168f2f7..3ae89b1 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -124,7 +124,7 @@ stored in the database. * (bug 47219) Allow specifying change type of Wikipedia feed items * prop=imageinfo now allows setting iiurlheight without setting iiurlwidth -* prop=info now adds the content model of the title. +* prop=info now adds the content model and page language of the title. * New upload log entries will now contain information on the relavent image (sha1 and timestamp). diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php index 787057d..d99e3d9 100644 --- a/includes/api/ApiQueryInfo.php +++ b/includes/api/ApiQueryInfo.php @@ -352,7 +352,8 @@ $ns = $title->getNamespace(); $dbkey = $title->getDBkey(); - $pageInfo['contentmodel'] = $title->getContentModel(); + $pageInfo['contentmodel'] = $title->getContentModel(); + $pageInfo['pagelanguage'] = $title->getPageLanguage()->getCode(); if ( $titleExists ) { global $wgDisableCounters; -- To view, visit https://gerrit.wikimedia.org/r/64512 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idd0412574b314ecf52d92243a3f8a08755474663 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add page language to prop=info - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Add page language to prop=info .. Add page language to prop=info This can be useful to determine the language of a page, for example javascript has english as page language. MediaWiki pages has it page language corresponding to the lang code in the sub page. Change-Id: Idd0412574b314ecf52d92243a3f8a08755474663 --- M RELEASE-NOTES-1.22 M includes/api/ApiQueryInfo.php 2 files changed, 2 insertions(+), 1 deletion(-) Approvals: Anomie: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index 04861fc..361ab25 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -129,7 +129,7 @@ stored in the database. * (bug 47219) Allow specifying change type of Wikipedia feed items * prop=imageinfo now allows setting iiurlheight without setting iiurlwidth -* prop=info now adds the content model of the title. +* prop=info now adds the content model and page language of the title. * New upload log entries will now contain information on the relavent image (sha1 and timestamp). diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php index 787057d..5f8c497 100644 --- a/includes/api/ApiQueryInfo.php +++ b/includes/api/ApiQueryInfo.php @@ -353,6 +353,7 @@ $dbkey = $title->getDBkey(); $pageInfo['contentmodel'] = $title->getContentModel(); + $pageInfo['pagelanguage'] = $title->getPageLanguage()->getCode(); if ( $titleExists ) { global $wgDisableCounters; -- To view, visit https://gerrit.wikimedia.org/r/64512 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idd0412574b314ecf52d92243a3f8a08755474663 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender Gerrit-Reviewer: Anomie Gerrit-Reviewer: Umherirrender Gerrit-Reviewer: Yurik Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits