diff options
-rw-r--r-- | include/photos.php | 7 | ||||
-rw-r--r-- | version.inc | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/include/photos.php b/include/photos.php index f9f160eb5..65532e6c2 100644 --- a/include/photos.php +++ b/include/photos.php @@ -164,7 +164,6 @@ function photo_upload($channel, $observer, $args) { $p['scale'] = 1; $r2 = $ph->save($p); $smallest = 1; - $width_x_height = $ph->getWidth() . 'x' . $ph->getHeight(); if(! $r2) $errors = true; } @@ -174,10 +173,10 @@ function photo_upload($channel, $observer, $args) { $p['scale'] = 2; $r3 = $ph->save($p); $smallest = 2; - $width_x_height = $ph->getWidth() . 'x' . $ph->getHeight(); if(! $r3) $errors = true; } + if($errors) { q("delete from photo where resource_id = '%s' and uid = %d", @@ -190,6 +189,10 @@ function photo_upload($channel, $observer, $args) { return $ret; } + // This will be the width and height of the smallest representation + + $width_x_height = $ph->getWidth() . 'x' . $ph->getHeight(); + $basename = basename($filename); $mid = item_message_id(); diff --git a/version.inc b/version.inc index a63c71f59..a1b9d8790 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2014-03-24.626 +2014-03-25.627 |