| @@ 383-398 (lines=16) @@ | ||
| 380 | * |
|
| 381 | * @return bool |
|
| 382 | **/ |
|
| 383 | public function checkMaxWidth() |
|
| 384 | { |
|
| 385 | if (!isset($this->maxWidth)) { |
|
| 386 | return true; |
|
| 387 | } |
|
| 388 | if (false !== $dimension = getimagesize($this->mediaTmpName)) { |
|
| 389 | if ($dimension[0] > $this->maxWidth) { |
|
| 390 | return false; |
|
| 391 | } |
|
| 392 | //$result = $dimension[0]; |
|
| 393 | //$this->width = $result; |
|
| 394 | } else { |
|
| 395 | trigger_error(sprintf('Failed fetching image size of %s, skipping max width check..', $this->mediaTmpName), E_USER_WARNING); |
|
| 396 | } |
|
| 397 | ||
| 398 | return true; |
|
| 399 | } |
|
| 400 | ||
| 401 | /** |
|
| @@ 444-457 (lines=14) @@ | ||
| 441 | * |
|
| 442 | * @return bool |
|
| 443 | **/ |
|
| 444 | public function checkMaxHeight() |
|
| 445 | { |
|
| 446 | if (!isset($this->maxHeight)) { |
|
| 447 | return true; |
|
| 448 | } |
|
| 449 | if (false !== $dimension = getimagesize($this->mediaTmpName)) { |
|
| 450 | if ($dimension[1] > $this->maxHeight) { |
|
| 451 | return false; |
|
| 452 | } |
|
| 453 | } else { |
|
| 454 | trigger_error(sprintf('Failed fetching image size of %s, skipping max height check..', $this->mediaTmpName), E_USER_WARNING); |
|
| 455 | } |
|
| 456 | ||
| 457 | return true; |
|
| 458 | } |
|
| 459 | ||
| 460 | /** |
|