Actually alias sessionkey to filekey, fixes bug in r92459
[lhc/web/wiklou.git] / includes / api / ApiQueryStashImageInfo.php
index b190302..d9a5f6b 100644 (file)
@@ -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();