ensure wall_upload always has width and height if the image is valid
This commit is contained in:
parent
50a7e9ce8f
commit
8547e4b2a8
@ -174,11 +174,11 @@ function photo_upload($channel, $observer, $args) {
|
|||||||
$p['scale'] = 2;
|
$p['scale'] = 2;
|
||||||
$r3 = $ph->save($p);
|
$r3 = $ph->save($p);
|
||||||
$smallest = 2;
|
$smallest = 2;
|
||||||
$width_x_height = $ph->getWidth() . 'x' . $ph->getHeight();
|
|
||||||
if(! $r3)
|
if(! $r3)
|
||||||
$errors = true;
|
$errors = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($errors) {
|
if($errors) {
|
||||||
q("delete from photo where resource_id = '%s' and uid = %d",
|
q("delete from photo where resource_id = '%s' and uid = %d",
|
||||||
dbesc($photo_hash),
|
dbesc($photo_hash),
|
||||||
@ -190,6 +190,10 @@ function photo_upload($channel, $observer, $args) {
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This will be the width and height of the smallest representation
|
||||||
|
|
||||||
|
$width_x_height = $ph->getWidth() . 'x' . $ph->getHeight();
|
||||||
|
|
||||||
$basename = basename($filename);
|
$basename = basename($filename);
|
||||||
$mid = item_message_id();
|
$mid = item_message_id();
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
2014-03-24.626
|
2014-03-25.627
|
||||||
|
Reference in New Issue
Block a user