Actually alias sessionkey to filekey, fixes bug in r92459
authorIan Baker <raindrift@users.mediawiki.org>
Thu, 21 Jul 2011 22:28:11 +0000 (22:28 +0000)
committerIan Baker <raindrift@users.mediawiki.org>
Thu, 21 Jul 2011 22:28:11 +0000 (22:28 +0000)
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();