another try at issue #89 - rotating photos
This commit is contained in:
parent
a756c0b182
commit
c07f694a07
@ -845,6 +845,14 @@ function import_mail($channel,$mails) {
|
||||
);
|
||||
continue;
|
||||
}
|
||||
if(array_key_exists('flags',$mail) && in_array('recalled',$mail['flags'])) {
|
||||
q("update mail set mail_recalled = 1 where mid = '%s' and uid = %d limit 1",
|
||||
dbesc($mail['message_id']),
|
||||
intval($channel['channel_id'])
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
$m = get_mail_elements($mail);
|
||||
if(! $m)
|
||||
continue;
|
||||
|
@ -245,8 +245,24 @@ function photos_post(&$a) {
|
||||
$width = $ph->getWidth();
|
||||
$height = $ph->getHeight();
|
||||
|
||||
$x = q("update photo set data = '%s', height = %d, width = %d where `resource_id` = '%s' and uid = %d and scale = 0",
|
||||
dbescbin($ph->imageString()),
|
||||
if(intval($r[0]['os_storage'])) {
|
||||
@file_put_contents($r[0]['data'],$ph->imageString());
|
||||
$data = $r[0]['data'];
|
||||
$fsize = @filesize($r[0]['data']);
|
||||
q("update attach set filesize = %d where hash = '%s' and uid = %d limit 1",
|
||||
intval($fsize),
|
||||
dbesc($resource_id),
|
||||
intval($page_owner_uid)
|
||||
);
|
||||
}
|
||||
else {
|
||||
$data = $ph->imageString();
|
||||
$fsize = strlen($data);
|
||||
}
|
||||
|
||||
$x = q("update photo set data = '%s', `size` = %d, height = %d, width = %d where `resource_id` = '%s' and uid = %d and scale = 0",
|
||||
dbescbin($data),
|
||||
intval($fsize),
|
||||
intval($height),
|
||||
intval($width),
|
||||
dbesc($resource_id),
|
||||
|
2821
util/hmessages.po
2821
util/hmessages.po
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user