From 757037c3bfe7c8f23a8dbda2f7be7b1dfaacf739 Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Thu, 7 Jun 2012 08:28:10 -0400 Subject: events: fix select events query select events that starts before display start date and/or ends after display end date. --- mod/events.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 mod/events.php (limited to 'mod') diff --git a/mod/events.php b/mod/events.php old mode 100644 new mode 100755 index 069046ff9..2a6fb692e --- a/mod/events.php +++ b/mod/events.php @@ -230,8 +230,8 @@ function events_content(&$a) { $r = q("SELECT `event`.*, `item`.`id` AS `itemid`,`item`.`plink`, `item`.`author-name`, `item`.`author-avatar`, `item`.`author-link` FROM `event` LEFT JOIN `item` ON `item`.`event-id` = `event`.`id` WHERE `event`.`uid` = %d - AND (( `adjust` = 0 AND `start` >= '%s' AND `start` <= '%s' ) - OR ( `adjust` = 1 AND `start` >= '%s' AND `start` <= '%s' )) ", + AND (( `adjust` = 0 AND `finish` >= '%s' AND `start` <= '%s' ) + OR ( `adjust` = 1 AND `finish` >= '%s' AND `start` <= '%s' )) ", intval(local_user()), dbesc($start), dbesc($finish), -- cgit v1.2.3 From 7cc8c369cb6a01cffb58215966844b53794f32f4 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Thu, 7 Jun 2012 17:42:13 +0200 Subject: Add support for PNG images with alpha --- mod/parse_url.php | 5 ++++- mod/photo.php | 18 ++++++++++++++---- mod/photos.php | 51 +++++++++++++++++++++++++++++++-------------------- mod/profile_photo.php | 10 ++++++---- mod/wall_upload.php | 34 ++++++++++++++++++---------------- 5 files changed, 73 insertions(+), 45 deletions(-) (limited to 'mod') diff --git a/mod/parse_url.php b/mod/parse_url.php index 27dac4d5d..cdf2223a8 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -215,8 +215,11 @@ function parse_url_content(&$a) { $i = fetch_url($image); if($i) { + // guess mimetype from headers or filename + $type = guess_image_type($image,true); + require_once('include/Photo.php'); - $ph = new Photo($i); + $ph = new Photo($i, $type); if($ph->is_valid()) { if($ph->getWidth() > 300 || $ph->getHeight() > 300) { $ph->scaleImage(300); diff --git a/mod/photo.php b/mod/photo.php index 3cd8250a9..e8e74cfde 100644 --- a/mod/photo.php +++ b/mod/photo.php @@ -1,6 +1,7 @@ $e){ + $photo = str_replace(".$e",'',$photo); + } if(substr($photo,-2,1) == '-') { $resolution = intval(substr($photo,-1,1)); @@ -119,6 +124,7 @@ function photo_init(&$a) { if(count($r)) { $data = $r[0]['data']; + $mimetype = $r[0]['type']; } else { @@ -136,6 +142,7 @@ function photo_init(&$a) { ); if(count($r)) { $data = file_get_contents('images/nosign.jpg'); + $mimetype = 'image/jpeg'; $prvcachecontrol = true; } } @@ -148,12 +155,15 @@ function photo_init(&$a) { case 4: $data = file_get_contents('images/person-175.jpg'); + $mimetype = 'image/jpeg'; break; case 5: $data = file_get_contents('images/person-80.jpg'); + $mimetype = 'image/jpeg'; break; case 6: $data = file_get_contents('images/person-48.jpg'); + $mimetype = 'image/jpeg'; break; default: killme(); @@ -164,11 +174,11 @@ function photo_init(&$a) { } if(isset($customres) && $customres > 0 && $customres < 500) { - require_once('include/Photo.php'); - $ph = new Photo($data); + $ph = new Photo($data, $mimetype); if($ph->is_valid()) { $ph->scaleImageSquare($customres); $data = $ph->imageString(); + $mimetype = $ph->getType(); } } @@ -181,7 +191,7 @@ function photo_init(&$a) { header_remove('pragma'); } - header("Content-type: image/jpeg"); + header("Content-type: ".$mimetype); if($prvcachecontrol) { diff --git a/mod/photos.php b/mod/photos.php index 3ce6f9934..072353587 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -5,6 +5,7 @@ require_once('include/acl_selectors.php'); require_once('include/bbcode.php'); require_once('include/security.php'); + function photos_init(&$a) { @@ -105,6 +106,8 @@ function photos_post(&$a) { logger('mod_photos: REQUEST ' . print_r($_REQUEST,true), LOGGER_DATA); logger('mod_photos: FILES ' . print_r($_FILES,true), LOGGER_DATA); + $phototypes = Photo::supportedTypes(); + $can_post = false; $visitor = 0; @@ -311,7 +314,7 @@ function photos_post(&$a) { intval($page_owner_uid) ); if(count($r)) { - $ph = new Photo($r[0]['data']); + $ph = new Photo($r[0]['data'], $r[0]['type']); if($ph->is_valid()) { $ph->rotate(270); @@ -362,6 +365,7 @@ function photos_post(&$a) { intval($page_owner_uid) ); if(count($p)) { + $ext = $phototypes[$p[0]['type']]; $r = q("UPDATE `photo` SET `desc` = '%s', `album` = '%s', `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s' WHERE `resource-id` = '%s' AND `uid` = %d", dbesc($desc), dbesc($albname), @@ -386,7 +390,7 @@ function photos_post(&$a) { $title = ''; $uri = item_new_uri($a->get_hostname(),$page_owner_uid); - + $arr = array(); $arr['uid'] = $page_owner_uid; @@ -412,7 +416,7 @@ function photos_post(&$a) { $arr['origin'] = 1; $arr['body'] = '[url=' . $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $p[0]['resource-id'] . ']' - . '[img]' . $a->get_baseurl() . '/photo/' . $p[0]['resource-id'] . '-' . $p[0]['scale'] . '.jpg' . '[/img]' + . '[img]' . $a->get_baseurl() . '/photo/' . $p[0]['resource-id'] . '-' . $p[0]['scale'] . '.'. $ext . '[/img]' . '[/url]'; $item_id = item_store($arr); @@ -581,17 +585,17 @@ function photos_post(&$a) { $arr['inform'] = $tagged[2]; $arr['origin'] = 1; $arr['body'] = '[url=' . $tagged[1] . ']' . $tagged[0] . '[/url]' . ' ' . t('was tagged in a') . ' ' . '[url=' . $a->get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource-id'] . ']' . t('photo') . '[/url]' . ' ' . t('by') . ' ' . '[url=' . $owner_record['url'] . ']' . $owner_record['name'] . '[/url]' ; - $arr['body'] .= "\n\n" . '[url=' . $a->get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource-id'] . ']' . '[img]' . $a->get_baseurl() . "/photo/" . $p[0]['resource-id'] . '-' . $best . '.jpg' . '[/img][/url]' . "\n" ; + $arr['body'] .= "\n\n" . '[url=' . $a->get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource-id'] . ']' . '[img]' . $a->get_baseurl() . "/photo/" . $p[0]['resource-id'] . '-' . $best . '.' . $ext . '[/img][/url]' . "\n" ; $arr['object'] = '' . ACTIVITY_OBJ_PERSON . '' . $tagged[0] . '' . $tagged[1] . '/' . $tagged[0] . ''; $arr['object'] .= '' . xmlify('' . "\n"); if($tagged[3]) - $arr['object'] .= xmlify('' . "\n"); + $arr['object'] .= xmlify('' . "\n"); $arr['object'] .= '' . "\n"; $arr['target'] = '' . ACTIVITY_OBJ_PHOTO . '' . $p[0]['desc'] . '' . $a->get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource-id'] . ''; - $arr['target'] .= '' . xmlify('' . "\n" . '') . ''; + $arr['target'] .= '' . xmlify('' . "\n" . '') . ''; $item_id = item_store($arr); if($item_id) { @@ -662,7 +666,7 @@ function photos_post(&$a) { $str_group_deny = perms2str(((is_array($_REQUEST['group_deny'])) ? $_REQUEST['group_deny'] : explode(',',$_REQUEST['group_deny']))); $str_contact_deny = perms2str(((is_array($_REQUEST['contact_deny'])) ? $_REQUEST['contact_deny'] : explode(',',$_REQUEST['contact_deny']))); - $ret = array('src' => '', 'filename' => '', 'filesize' => 0); + $ret = array('src' => '', 'filename' => '', 'filesize' => 0, 'type' => ''); call_hooks('photo_post_file',$ret); @@ -670,15 +674,17 @@ function photos_post(&$a) { $src = $ret['src']; $filename = $ret['filename']; $filesize = $ret['filesize']; + $type = $ret['type']; } else { $src = $_FILES['userfile']['tmp_name']; $filename = basename($_FILES['userfile']['name']); $filesize = intval($_FILES['userfile']['size']); + $type = $_FILES['userfile']['type']; } + - - logger('photos: upload: received file: ' . $filename . ' as ' . $src . ' ' . $filesize . ' bytes', LOGGER_DEBUG); + logger('photos: upload: received file: ' . $filename . ' as ' . $src . ' '. $type . ' ' . $filesize . ' bytes', LOGGER_DEBUG); $maximagesize = get_config('system','maximagesize'); @@ -701,7 +707,7 @@ function photos_post(&$a) { logger('mod/photos.php: photos_post(): loading the contents of ' . $src , LOGGER_DEBUG); $imagedata = @file_get_contents($src); - $ph = new Photo($imagedata); + $ph = new Photo($imagedata, $type); if(! $ph->is_valid()) { logger('mod/photos.php: photos_post(): unable to process image' , LOGGER_DEBUG); @@ -771,7 +777,7 @@ function photos_post(&$a) { $arr['origin'] = 1; $arr['body'] = '[url=' . $a->get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $photo_hash . ']' - . '[img]' . $a->get_baseurl() . "/photo/{$photo_hash}-{$smallest}.jpg" . '[/img]' + . '[img]' . $a->get_baseurl() . "/photo/{$photo_hash}-{$smallest}.".$ph->getExt() . '[/img]' . '[/url]'; $item_id = item_store($arr); @@ -814,8 +820,8 @@ function photos_content(&$a) { notice( t('Public access denied.') . EOL); return; } - - + + require_once('include/bbcode.php'); require_once('include/security.php'); require_once('include/conversation.php'); @@ -825,6 +831,8 @@ function photos_content(&$a) { return; } + $phototypes = Photo::supportedTypes(); + $_SESSION['photo_return'] = $a->cmd; // @@ -991,7 +999,7 @@ function photos_content(&$a) { $a->set_pager_itemspage(20); } - $r = q("SELECT `resource-id`, `id`, `filename`, max(`scale`) AS `scale`, `desc` FROM `photo` WHERE `uid` = %d AND `album` = '%s' + $r = q("SELECT `resource-id`, `id`, `filename`, type, max(`scale`) AS `scale`, `desc` FROM `photo` WHERE `uid` = %d AND `album` = '%s' AND `scale` <= 4 $sql_extra GROUP BY `resource-id` ORDER BY `created` DESC LIMIT %d , %d", intval($owner_uid), dbesc($album), @@ -1038,13 +1046,15 @@ function photos_content(&$a) { $twist = 'rotleft'; else $twist = 'rotright'; + + $ext = $phototypes[$rr['type']]; $o .= replace_macros($tpl,array( '$id' => $rr['id'], '$twist' => ' ' . $twist . rand(2,4), '$photolink' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $rr['resource-id'], '$phototitle' => t('View Photo'), - '$imgsrc' => $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['scale'] . '.jpg', + '$imgsrc' => $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['scale'] . '.' .$ext, '$imgalt' => template_escape($rr['filename']), '$desc'=> template_escape($rr['desc']) )); @@ -1158,9 +1168,9 @@ function photos_content(&$a) { $prevlink = array($prevlink, '') ; $photo = array( - 'href' => $a->get_baseurl() . '/photo/' . $hires['resource-id'] . '-' . $hires['scale'] . '.jpg', + 'href' => $a->get_baseurl() . '/photo/' . $hires['resource-id'] . '-' . $hires['scale'] . '.' . $phototypes[$hires['type']], 'title'=> t('View Full Size'), - 'src' => $a->get_baseurl() . '/photo/' . $lores['resource-id'] . '-' . $lores['scale'] . '.jpg' . '?f=&_u=' . datetime_convert('','','','ymdhis') + 'src' => $a->get_baseurl() . '/photo/' . $lores['resource-id'] . '-' . $lores['scale'] . '.' . $phototypes[$lores['type']] . '?f=&_u=' . datetime_convert('','','','ymdhis') ); if($nextlink) @@ -1449,7 +1459,7 @@ function photos_content(&$a) { $a->set_pager_itemspage(20); } - $r = q("SELECT `resource-id`, `id`, `filename`, `album`, max(`scale`) AS `scale` FROM `photo` + $r = q("SELECT `resource-id`, `id`, `filename`, type, `album`, max(`scale`) AS `scale` FROM `photo` WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' $sql_extra GROUP BY `resource-id` ORDER BY `created` DESC LIMIT %d , %d", intval($a->data['user']['uid']), @@ -1469,13 +1479,14 @@ function photos_content(&$a) { $twist = 'rotleft'; else $twist = 'rotright'; - + $ext = $phototypes[$rr['type']]; + $photos[] = array( 'id' => $rr['id'], 'twist' => ' ' . $twist . rand(2,4), 'link' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $rr['resource-id'], 'title' => t('View Photo'), - 'src' => $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . ((($rr['scale']) == 6) ? 4 : $rr['scale']) . '.jpg', + 'src' => $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . ((($rr['scale']) == 6) ? 4 : $rr['scale']) . '.' . $ext, 'alt' => template_escape($rr['filename']), 'album' => array( 'link' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($rr['album']), diff --git a/mod/profile_photo.php b/mod/profile_photo.php index ace8dadd4..2817f3942 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -53,7 +53,7 @@ function profile_photo_post(&$a) { $base_image = $r[0]; - $im = new Photo($base_image['data']); + $im = new Photo($base_image['data'], $base_image['type']); if($im->is_valid()) { $im->cropImage(175,$srcX,$srcY,$srcW,$srcH); @@ -108,6 +108,7 @@ function profile_photo_post(&$a) { $src = $_FILES['userfile']['tmp_name']; $filename = basename($_FILES['userfile']['name']); $filesize = intval($_FILES['userfile']['size']); + $filetype = $_FILES['userfile']['type']; $maximagesize = get_config('system','maximagesize'); @@ -118,7 +119,7 @@ function profile_photo_post(&$a) { } $imagedata = @file_get_contents($src); - $ph = new Photo($imagedata); + $ph = new Photo($imagedata, $filetype); if(! $ph->is_valid()) { notice( t('Unable to process image.') . EOL ); @@ -193,7 +194,7 @@ function profile_photo_content(&$a) { goaway($a->get_baseurl() . '/profiles'); return; // NOTREACHED } - $ph = new Photo($r[0]['data']); + $ph = new Photo($r[0]['data'], $r[0]['type']); profile_photo_crop_ui_head($a, $ph); // go ahead as we have jus uploaded a new photo to crop } @@ -214,7 +215,7 @@ function profile_photo_content(&$a) { return $o; } else { - $filename = $a->config['imagecrop'] . '-' . $a->config['imagecrop_resolution'] . '.jpg'; + $filename = $a->config['imagecrop'] . '-' . $a->config['imagecrop_resolution'] . '.'.$a->config['imagecrop_ext']; $resolution = $a->config['imagecrop_resolution']; $tpl = get_markup_template("cropbody.tpl"); $o .= replace_macros($tpl,array( @@ -268,6 +269,7 @@ function profile_photo_crop_ui_head(&$a, $ph){ $a->config['imagecrop'] = $hash; $a->config['imagecrop_resolution'] = $smallest; + $a->config['imagecrop_ext'] = $ph->getExt(); $a->page['htmlhead'] .= get_markup_template("crophead.tpl"); return; }} diff --git a/mod/wall_upload.php b/mod/wall_upload.php index fa66561e8..20666e0ef 100644 --- a/mod/wall_upload.php +++ b/mod/wall_upload.php @@ -57,16 +57,18 @@ function wall_upload_post(&$a) { if(! x($_FILES,'userfile') && ! x($_FILES,'media')) killme(); - if(x($_FILES,'userfile')) { - $src = $_FILES['userfile']['tmp_name']; - $filename = basename($_FILES['userfile']['name']); - $filesize = intval($_FILES['userfile']['size']); - } - elseif(x($_FILES,'media')) { - $src = $_FILES['media']['tmp_name']; - $filename = basename($_FILES['media']['name']); - $filesize = intval($_FILES['media']['size']); - } + if(x($_FILES,'userfile')) { + $src = $_FILES['userfile']['tmp_name']; + $filename = basename($_FILES['userfile']['name']); + $filesize = intval($_FILES['userfile']['size']); + $filetype = $_FILES['userfile']['type']; + } + elseif(x($_FILES,'media')) { + $src = $_FILES['media']['tmp_name']; + $filename = basename($_FILES['media']['name']); + $filesize = intval($_FILES['media']['size']); + $filetype = $_FILES['media']['type']; + } $maximagesize = get_config('system','maximagesize'); @@ -77,7 +79,7 @@ function wall_upload_post(&$a) { } $imagedata = @file_get_contents($src); - $ph = new Photo($imagedata); + $ph = new Photo($imagedata, $filetype); if(! $ph->is_valid()) { echo ( t('Unable to process image.') . EOL); @@ -123,19 +125,19 @@ function wall_upload_post(&$a) { /* mod Waitman Gobble NO WARRANTY */ //if we get the signal then return the image url info in BBCODE, otherwise this outputs the info and bails (for the ajax image uploader on wall post) - if ($_REQUEST['hush']!='yeah') { + if ($_REQUEST['hush']!='yeah') { /*existing code*/ if(local_user() && intval(get_pconfig(local_user(),'system','plaintext'))) - echo "\n\n" . '[url=' . $a->get_baseurl() . '/photos/' . $page_owner_nick . '/image/' . $hash . '][img]' . $a->get_baseurl() . "/photo/{$hash}-{$smallest}.jpg[/img][/url]\n\n"; + echo "\n\n" . '[url=' . $a->get_baseurl() . '/photos/' . $page_owner_nick . '/image/' . $hash . '][img]' . $a->get_baseurl() . "/photo/{$hash}-{$smallest}.".$ph->getExt()."[/img][/url]\n\n"; else - echo '

\"$basename\"

"; + echo '

getExt()."\" alt=\"$basename\" />

"; /*existing code*/ } else { - $m = '[url=' . $a->get_baseurl() . '/photos/' . $page_owner_nick . '/image/' . $hash . '][img]' . $a->get_baseurl() . "/photo/{$hash}-{$smallest}.jpg[/img][/url]"; + $m = '[url=' . $a->get_baseurl() . '/photos/' . $page_owner_nick . '/image/' . $hash . '][img]' . $a->get_baseurl() . "/photo/{$hash}-{$smallest}.".$ph->getExt()."[/img][/url]"; return($m); - } + } /* mod Waitman Gobble NO WARRANTY */ killme(); -- cgit v1.2.3 From 2438c6e45d47ca194b51f99ddf113112fbb6ccb9 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Thu, 7 Jun 2012 20:17:31 +0200 Subject: png support: update database.sql, fix some typos, fix tinymce image browser --- mod/fbrowser.php | 18 ++++++++++++++---- mod/photos.php | 4 ++-- mod/profile_photo.php | 3 ++- mod/wall_upload.php | 3 ++- 4 files changed, 20 insertions(+), 8 deletions(-) (limited to 'mod') diff --git a/mod/fbrowser.php b/mod/fbrowser.php index 66ff9252e..3f034226e 100644 --- a/mod/fbrowser.php +++ b/mod/fbrowser.php @@ -4,7 +4,9 @@ * @subpackage FileBrowser * @author Fabio Comuni */ - + +require_once('include/Photo.php'); + /** * @param App $a */ @@ -43,14 +45,22 @@ function fbrowser_content($a){ $path[]=array($a->get_baseurl()."/fbrowser/image/".$a->argv[2]."/", $album); } - $r = q("SELECT `resource-id`, `id`, `filename`, min(`scale`) AS `hiq`,max(`scale`) AS `loq`, `desc` + $r = q("SELECT `resource-id`, `id`, `filename`, type, min(`scale`) AS `hiq`,max(`scale`) AS `loq`, `desc` FROM `photo` WHERE `uid` = %d $sql_extra GROUP BY `resource-id` $sql_extra2", intval(local_user()) ); - - function files1($rr){ global $a; return array( $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['hiq'] . '.jpg', template_escape($rr['filename']), $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['loq'] . '.jpg'); } + function files1($rr){ + global $a; + $types = Photo::supportedTypes(); + $ext = $types[$rr['type']]; + return array( + $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['hiq'] . '.' .$ext, + template_escape($rr['filename']), + $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['loq'] . '.'. $ext + ); + } $files = array_map("files1", $r); $tpl = get_markup_template("filebrowser.tpl"); diff --git a/mod/photos.php b/mod/photos.php index 072353587..efeab8fa3 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -682,9 +682,9 @@ function photos_post(&$a) { $filesize = intval($_FILES['userfile']['size']); $type = $_FILES['userfile']['type']; } - + if ($type=="") $type=guess_image_type($filename); - logger('photos: upload: received file: ' . $filename . ' as ' . $src . ' '. $type . ' ' . $filesize . ' bytes', LOGGER_DEBUG); + logger('photos: upload: received file: ' . $filename . ' as ' . $src . ' ('. $type . ') ' . $filesize . ' bytes', LOGGER_DEBUG); $maximagesize = get_config('system','maximagesize'); diff --git a/mod/profile_photo.php b/mod/profile_photo.php index 2817f3942..e44707f9b 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -109,7 +109,8 @@ function profile_photo_post(&$a) { $filename = basename($_FILES['userfile']['name']); $filesize = intval($_FILES['userfile']['size']); $filetype = $_FILES['userfile']['type']; - + if ($filetype=="") $filetype=guess_image_type($filename); + $maximagesize = get_config('system','maximagesize'); if(($maximagesize) && ($filesize > $maximagesize)) { diff --git a/mod/wall_upload.php b/mod/wall_upload.php index 20666e0ef..4b81f8d1c 100644 --- a/mod/wall_upload.php +++ b/mod/wall_upload.php @@ -69,7 +69,8 @@ function wall_upload_post(&$a) { $filesize = intval($_FILES['media']['size']); $filetype = $_FILES['media']['type']; } - + + if ($filetype=="") $filetype=guess_image_type($filename); $maximagesize = get_config('system','maximagesize'); if(($maximagesize) && ($filesize > $maximagesize)) { -- cgit v1.2.3