From 4b9f91999eec50f5066049c3dc74665ae523adbc Mon Sep 17 00:00:00 2001 From: Victor Vasiliev Date: Mon, 17 Mar 2008 08:25:22 +0000 Subject: [PATCH] * Introduced list=allimages * (bug 13371) Build page set from image hashes * Mark non-existent messages in meta=allmessages as missing --- RELEASE-NOTES | 3 +++ includes/api/ApiQuery.php | 3 +++ includes/api/ApiQueryAllmessages.php | 6 +++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index fcf3a40b27..7f8a61ad8d 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -109,6 +109,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Added action=edit * (bug 11401) Added xmldoublequote to xml formatter * Added rvsection parameter to prop=revisions to allow fetching the content of a certain section only +* Introduced list=allimages +* (bug 13371) Build page set from image hashes +* Mark non-existent messages in meta=allmessages as missing === Languages updated in 1.13 === diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php index d3110a59c2..6775ddbdf6 100644 --- a/includes/api/ApiQuery.php +++ b/includes/api/ApiQuery.php @@ -58,6 +58,7 @@ class ApiQuery extends ApiBase { ); private $mQueryListModules = array ( + 'allimages' => 'ApiQueryAllimages', 'allpages' => 'ApiQueryAllpages', 'alllinks' => 'ApiQueryAllLinks', 'allcategories' => 'ApiQueryAllCategories', @@ -423,12 +424,14 @@ class ApiQuery extends ApiBase { $this->mAllowedGenerators = array(); // Will be repopulated $astriks = str_repeat('--- ', 8); + $astriks2 = str_repeat('*** ', 10); $msg .= "\n$astriks Query: Prop $astriks\n\n"; $msg .= $this->makeHelpMsgHelper($this->mQueryPropModules, 'prop'); $msg .= "\n$astriks Query: List $astriks\n\n"; $msg .= $this->makeHelpMsgHelper($this->mQueryListModules, 'list'); $msg .= "\n$astriks Query: Meta $astriks\n\n"; $msg .= $this->makeHelpMsgHelper($this->mQueryMetaModules, 'meta'); + $msg .= "\n\n$astriks2 Modules: continuation $astriks2\n\n"; // Perform the base call last because the $this->mAllowedGenerators // will be updated inside makeHelpMsgHelper() diff --git a/includes/api/ApiQueryAllmessages.php b/includes/api/ApiQueryAllmessages.php index ce4f6c5cdc..aea3c4d057 100644 --- a/includes/api/ApiQueryAllmessages.php +++ b/includes/api/ApiQueryAllmessages.php @@ -87,7 +87,11 @@ class ApiQueryAllmessages extends ApiQueryBase { foreach( $messages as $name => $value ) { $message = array(); $message['name'] = $name; - $result->setContent( $message, $value ); + if( wfEmptyMsg( $name, $value ) ) { + $message['missing'] = ''; + } else { + $result->setContent( $message, $value ); + } $messages_out[] = $message; } $result->setIndexedTagName( $messages_out, 'message' ); -- 2.20.1