Merge "Add support for PHP7 random_bytes in favor of mcrypt_create_iv"
[lhc/web/wiklou.git] / includes / api / ApiQueryMyStashedFiles.php
index 9be5849..1324f2f 100644 (file)
@@ -36,7 +36,7 @@ class ApiQueryMyStashedFiles extends ApiQueryBase {
                $user = $this->getUser();
 
                if ( $user->isAnon() ) {
-                       $this->dieUsage( 'The upload stash is only available to logged-in users.', 'stashnotloggedin' );
+                       $this->dieWithError( 'apierror-mustbeloggedin-uploadstash', 'stashnotloggedin' );
                }
 
                // Note: If user is logged in but cannot upload, they can still see
@@ -92,10 +92,10 @@ class ApiQueryMyStashedFiles extends ApiQueryBase {
                        ];
 
                        if ( isset( $prop['size'] ) ) {
-                               $item['size'] = (int) $row->us_size;
-                               $item['width'] = (int) $row->us_image_width;
-                               $item['height'] = (int) $row->us_image_height;
-                               $item['bits'] = (int) $row->us_image_bits;
+                               $item['size'] = (int)$row->us_size;
+                               $item['width'] = (int)$row->us_image_width;
+                               $item['height'] = (int)$row->us_image_height;
+                               $item['bits'] = (int)$row->us_image_bits;
                        }
 
                        if ( isset( $prop['type'] ) ) {