aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoan Kattouw <catrope@users.mediawiki.org>2008-01-20 14:20:50 +0000
committerRoan Kattouw <catrope@users.mediawiki.org>2008-01-20 14:20:50 +0000
commit60283a5f0aff387c15f99f17d494a0dc51ef4e20 (patch)
treeee6b0f7434f983981738d7aa8c3656cec13fb6d3
parente55d71d0cd6a6353fe4713f219f56a520979101d (diff)
downloadmediawikicore-60283a5f0aff387c15f99f17d494a0dc51ef4e20.tar.gz
mediawikicore-60283a5f0aff387c15f99f17d494a0dc51ef4e20.zip
(bug 12704) Adding amlang parameter to meta=allmessages
Notes
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/29984
-rw-r--r--RELEASE-NOTES1
-rw-r--r--includes/api/ApiQueryAllmessages.php11
2 files changed, 11 insertions, 1 deletions
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index e1027ee26b67..d57fd4adbd53 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -447,6 +447,7 @@ Full API documentation is available at http://www.mediawiki.org/wiki/API
* Added support for image thumbnailing to prop=imageinfo
* action={login,block,delete,move,protect,rollback,unblock,undelete} now must be POSTed
* prop=imageinfo interface changed: iihistory replaced by iilimit, iistart and iiend parameters
+* Added amlang parameter to meta=allmessages
=== Languages updated in 1.12 ===
diff --git a/includes/api/ApiQueryAllmessages.php b/includes/api/ApiQueryAllmessages.php
index da48f690ebaf..00957873af9b 100644
--- a/includes/api/ApiQueryAllmessages.php
+++ b/includes/api/ApiQueryAllmessages.php
@@ -42,6 +42,13 @@ class ApiQueryAllmessages extends ApiQueryBase {
public function execute() {
global $wgMessageCache;
$params = $this->extractRequestParams();
+
+ if(!is_null($params['lang']))
+ {
+ global $wgLang;
+ $wgLang = Language::factory($params['lang']);
+ }
+
//Determine which messages should we print
$messages_target = array();
@@ -93,6 +100,7 @@ class ApiQueryAllmessages extends ApiQueryBase {
ApiBase :: PARAM_DFLT => '*',
),
'filter' => array(),
+ 'lang' => null,
);
}
@@ -100,6 +108,7 @@ class ApiQueryAllmessages extends ApiQueryBase {
return array (
'messages' => 'Which messages to output. "*" means all messages',
'filter' => 'Return only messages that contains specified string',
+ 'lang' => 'Language code',
);
}
@@ -110,7 +119,7 @@ class ApiQueryAllmessages extends ApiQueryBase {
protected function getExamples() {
return array(
'api.php?action=query&meta=allmessages&amfilter=ipb-',
- 'api.php?action=query&meta=allmessages&ammessages=august|mainpage',
+ 'api.php?action=query&meta=allmessages&ammessages=august|mainpage&amlang=de',
);
}