Code Duplication    Length = 12-13 lines in 2 locations

class/uploader.php 2 locations

@@ 402-414 (lines=13) @@
399
	*
400
	* @return  bool
401
	**/
402
	function checkMaxWidth() {
403
		if (!isset($this->maxWidth)) {
404
			return true;
405
		}
406
		if (false !== $dimension = getimagesize($this->mediaTmpName)) {
407
			if ($dimension[0] > $this->maxWidth) {
408
				return false;
409
			}
410
		} else {
411
			trigger_error(sprintf('Failed fetching image size of %s, skipping max width check..', $this->mediaTmpName), E_USER_WARNING);
412
		}
413
		return true;
414
	}
415
416
	/**
417
	* Is the picture the right height?
@@ 421-432 (lines=12) @@
418
	*
419
	* @return  bool
420
	**/
421
	function checkMaxHeight() {
422
		if (!isset($this->maxHeight)) {
423
			return true;
424
		}
425
		if (false !== $dimension = getimagesize($this->mediaTmpName)) {
426
			if ($dimension[1] > $this->maxHeight) {
427
				return false;
428
			}
429
 			trigger_error(sprintf('Failed fetching image size of %s, skipping max height check..', $this->mediaTmpName), E_USER_WARNING);
430
		}
431
		return true;
432
	}
433
434
	/**
435
	* Check whether or not the uploaded file type is allowed