diff options
author | friendica <info@friendica.com> | 2014-03-23 08:07:56 +1100 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-03-23 08:07:56 +1100 |
commit | f6af20576a215dcf2fbc03eb528548cd320fafbe (patch) | |
tree | 9def633ad3ed27a09ab343906ccf2450d81da086 | |
parent | 13916566f016a6b754401ca6cd6423f2a7ecaccf (diff) | |
parent | 7d90340edaf4e47932fc2add392571ff80c27881 (diff) | |
download | volse-hubzilla-f6af20576a215dcf2fbc03eb528548cd320fafbe.tar.gz volse-hubzilla-f6af20576a215dcf2fbc03eb528548cd320fafbe.tar.bz2 volse-hubzilla-f6af20576a215dcf2fbc03eb528548cd320fafbe.zip |
Merge pull request #374 from git-marijus/master
add width and height to uploaded photo body
-rw-r--r-- | include/photos.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/photos.php b/include/photos.php index be386f1c9..c0243cc15 100644 --- a/include/photos.php +++ b/include/photos.php @@ -164,6 +164,7 @@ 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; } @@ -173,6 +174,7 @@ 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; } @@ -221,7 +223,7 @@ function photo_upload($channel, $observer, $args) { $arr['body'] = '[zrl=' . z_root() . '/photos/' . $channel['channel_address'] . '/image/' . $photo_hash . ']' - . '[zmg]' . z_root() . "/photo/{$photo_hash}-{$smallest}.".$ph->getExt() . '[/zmg]' + . '[zmg=' . $width_x_height. ']' . z_root() . "/photo/{$photo_hash}-{$smallest}.".$ph->getExt() . '[/zmg]' . '[/zrl]'; $result = item_store($arr); |