r95714 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95713‎ | r95714 | r95715 >
Date:22:21, 29 August 2011
Author:krinkle
Status:ok
Tags:
Comment:
Add support to only return keys in ApiAllMessages
* Applying patch from bug 30591
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryAllmessages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryAllmessages.php
@@ -158,7 +158,9 @@
159159 } else {
160160 $msgString = $msg->plain();
161161 }
162 - ApiResult::setContent( $a, $msgString );
 162+ if ( !$params['nocontent'] ) {
 163+ ApiResult::setContent( $a, $msgString );
 164+ }
163165 if ( isset( $prop['default'] ) ) {
164166 $default = wfMessage( $message )->inLanguage( $langObj )->useDatabase( false );
165167 if ( !$default->exists() ) {
@@ -204,6 +206,7 @@
205207 )
206208 ),
207209 'enableparser' => false,
 210+ 'nocontent' => false,
208211 'args' => array(
209212 ApiBase::PARAM_ISMULTI => true,
210213 ApiBase::PARAM_ALLOW_DUPLICATES => true,
@@ -230,7 +233,8 @@
231234 'messages' => 'Which messages to output. "*" (default) means all messages',
232235 'prop' => 'Which properties to get',
233236 'enableparser' => array( 'Set to enable parser, will preprocess the wikitext of message',
234 - 'Will substitute magic words, handle templates etc.' ),
 237+ 'Will substitute magic words, handle templates etc.' ),
 238+ 'nocontent' => 'Set to not include the content of the messages in the output.',
235239 'title' => 'Page name to use as context when parsing message (for enableparser option)',
236240 'args' => 'Arguments to be substituted into message',
237241 'prefix' => 'Return messages with this prefix',
Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -87,6 +87,7 @@
8888 * (bug 18634) Create API to fetch MediaWiki's language fallback tree structure.
8989 * (bug 26885) Allow show/hide of account blocks, temporary blocks and single IP
9090 address blocks for list=blocks.
 91+* (bug 30591) Add support to only return keys in ApiAllMessages.
9192
9293 === Languages updated in 1.19 ===
9394

Follow-up revisions

RevisionCommit summaryAuthorDate
r95867Clarify parameter description added in r95714catrope14:30, 31 August 2011

Status & tagging log