- if (isset($files['attachFile_1']) &&
- CRM_Utils_Array::value('tmp_name', $files['attachFile_1'])
- ) {
- list($width, $height) = getimagesize($files['attachFile_1']['tmp_name']);
- if ($width > 360 || $height > 360) {
- $errors['attachFile_1'] = ts('Your picture or image file cannot be larger than 360 x 360 pixels in size.') . ' ' . ts("The dimensions of the image you have selected are %1 x %2.", array(1 => $width, 2 => $height)) . ' ' . ts('Please shrink or crop the file or find another smaller image and try again.');
- }
- }