aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-03-25 12:44:30 -0700
committerfriendica <info@friendica.com>2014-03-25 12:44:30 -0700
commit8547e4b2a8f41b6a600006b2673809e5b383059b (patch)
tree6388e533bef374a23e2d753f05bfdac538eaa392
parent50a7e9ce8fe30959d6e4343e8fdafaeca1e7856c (diff)
downloadvolse-hubzilla-8547e4b2a8f41b6a600006b2673809e5b383059b.tar.gz
volse-hubzilla-8547e4b2a8f41b6a600006b2673809e5b383059b.tar.bz2
volse-hubzilla-8547e4b2a8f41b6a600006b2673809e5b383059b.zip
ensure wall_upload always has width and height if the image is valid
-rw-r--r--include/photos.php6
-rw-r--r--version.inc2
2 files changed, 6 insertions, 2 deletions
diff --git a/include/photos.php b/include/photos.php
index c0243cc15..d1462a27f 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -174,10 +174,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 +190,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