aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/photos.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/photos.php b/include/photos.php
index 240f3d1c4..2fc25b4bf 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -211,6 +211,15 @@ function photo_upload($channel, $observer, $args) {
$errors = true;
}
+ if(($width > 320 || $height > 320) && (! $errors)) {
+ $ph->scaleImage(320);
+ $p['scale'] = 3;
+ $r3 = $ph->save($p);
+ $smallest = 3;
+ if(! $r3)
+ $errors = true;
+ }
+
if($errors) {
q("delete from photo where resource_id = '%s' and uid = %d",
dbesc($photo_hash),