summaryrefslogtreecommitdiff
path: root/includes/api/ApiQueryStashImageInfo.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
commitd9022f63880ce039446fba8364f68e656b7bf4cb (patch)
tree16b40fbf17bf7c9ee6f4ead25b16dd192378050a /includes/api/ApiQueryStashImageInfo.php
parent27cf83d177256813e2e802241085fce5dd0f3fb9 (diff)
Update to MediaWiki 1.19.0
Diffstat (limited to 'includes/api/ApiQueryStashImageInfo.php')
-rw-r--r--includes/api/ApiQueryStashImageInfo.php7
1 files changed, 6 insertions, 1 deletions
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',