From d9022f63880ce039446fba8364f68e656b7bf4cb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 3 May 2012 13:01:35 +0200 Subject: Update to MediaWiki 1.19.0 --- includes/api/ApiQueryStashImageInfo.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'includes/api/ApiQueryStashImageInfo.php') diff --git a/includes/api/ApiQueryStashImageInfo.php b/includes/api/ApiQueryStashImageInfo.php index b1903025..4501ec58 100644 --- a/includes/api/ApiQueryStashImageInfo.php +++ b/includes/api/ApiQueryStashImageInfo.php @@ -45,6 +45,11 @@ class ApiQueryStashImageInfo extends ApiQueryImageInfo { $this->dieUsage( "One of filekey or sessionkey must be supplied", 'nofilekey'); } + // Alias sessionkey to filekey, but give an existing filekey precedence. + if ( !$params['filekey'] && $params['sessionkey'] ) { + $params['filekey'] = $params['sessionkey']; + } + try { $stash = RepoGroup::singleton()->getLocalRepo()->getUploadStash(); @@ -122,7 +127,7 @@ class ApiQueryStashImageInfo extends ApiQueryImageInfo { return 'Returns image information for stashed images'; } - protected function getExamples() { + public function getExamples() { return array( 'api.php?action=query&prop=stashimageinfo&siifilekey=124sd34rsdf567', 'api.php?action=query&prop=stashimageinfo&siifilekey=b34edoe3|bceffd4&siiurlwidth=120&siiprop=url', -- cgit v1.2.3-54-g00ecf