summaryrefslogtreecommitdiff
path: root/includes/api/ApiQueryStashImageInfo.php
diff options
context:
space:
mode:
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',