r29984 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r29983‎ | r29984 | r29985 >
Date:14:20, 20 January 2008
Author:catrope
Status:old
Tags:
Comment:
(bug 12704) Adding amlang parameter to meta=allmessages
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryAllmessages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryAllmessages.php
@@ -42,6 +42,13 @@
4343 public function execute() {
4444 global $wgMessageCache;
4545 $params = $this->extractRequestParams();
 46+
 47+ if(!is_null($params['lang']))
 48+ {
 49+ global $wgLang;
 50+ $wgLang = Language::factory($params['lang']);
 51+ }
 52+
4653
4754 //Determine which messages should we print
4855 $messages_target = array();
@@ -93,6 +100,7 @@
94101 ApiBase :: PARAM_DFLT => '*',
95102 ),
96103 'filter' => array(),
 104+ 'lang' => null,
97105 );
98106 }
99107
@@ -100,6 +108,7 @@
101109 return array (
102110 'messages' => 'Which messages to output. "*" means all messages',
103111 'filter' => 'Return only messages that contains specified string',
 112+ 'lang' => 'Language code',
104113 );
105114 }
106115
@@ -110,7 +119,7 @@
111120 protected function getExamples() {
112121 return array(
113122 'api.php?action=query&meta=allmessages&amfilter=ipb-',
114 - 'api.php?action=query&meta=allmessages&ammessages=august|mainpage',
 123+ 'api.php?action=query&meta=allmessages&ammessages=august|mainpage&amlang=de',
115124 );
116125 }
117126
Index: trunk/phase3/RELEASE-NOTES
@@ -447,6 +447,7 @@
448448 * Added support for image thumbnailing to prop=imageinfo
449449 * action={login,block,delete,move,protect,rollback,unblock,undelete} now must be POSTed
450450 * prop=imageinfo interface changed: iihistory replaced by iilimit, iistart and iiend parameters
 451+* Added amlang parameter to meta=allmessages
451452
452453 === Languages updated in 1.12 ===
453454

Status & tagging log