MediaWiki master
TransformTooBigImageAreaError.php
Go to the documentation of this file.
1<?php
32
39 public function __construct( $params, $maxImageArea ) {
40 $msg = wfMessage( 'thumbnail_toobigimagearea' );
41 $msg->params(
42 // messages used: size-pixel, size-kilopixel, size-megapixel, size-gigapixel, size-terapixel,
43 // size-petapixel, size-exapixel, size-zettapixel, size-yottapixel, size-ronnapixel, size-quettapixel
44 $msg->getLanguage()->formatComputingNumbers( $maxImageArea, 1000, "size-$1pixel" )
45 );
46
47 parent::__construct( 'thumbnail_error',
48 max( $params['width'] ?? 0, 120 ),
49 max( $params['height'] ?? 0, 120 ),
50 $msg
51 );
52 }
53
54 public function getHttpStatusCode() {
55 return 400;
56 }
57}
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
array $params
The job parameters.
Basic media transform error class.
Shortcut class for parameter file size errors.