aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRedMatrix <info@friendica.com>2014-03-26 06:39:01 +1100
committerRedMatrix <info@friendica.com>2014-03-26 06:39:01 +1100
commitfbb12ca86acf40bf61f2ad8f69aee78db8df8dcb (patch)
tree56da5d2d53eef592bd309dcf633793d423036ad5
parent0e10f81d44c20843060e9cb892c44c31ce538b27 (diff)
parentf5467a6d511c2fbf2ba88e026f75e8a304a9ab2d (diff)
downloadvolse-hubzilla-fbb12ca86acf40bf61f2ad8f69aee78db8df8dcb.tar.gz
volse-hubzilla-fbb12ca86acf40bf61f2ad8f69aee78db8df8dcb.tar.bz2
volse-hubzilla-fbb12ca86acf40bf61f2ad8f69aee78db8df8dcb.zip
Merge pull request #377 from beardy-unixer/master
Fix wall photo uploads.
-rw-r--r--include/photos.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/photos.php b/include/photos.php
index c0243cc15..f9f160eb5 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -221,9 +221,13 @@ function photo_upload($channel, $observer, $args) {
$arr['plink'] = z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . $arr['mid'];
+ if ($width_x_height)
+ $tag = '[zmg=' . $width_x_height. ']';
+ else
+ $tag = '[zmg]';
$arr['body'] = '[zrl=' . z_root() . '/photos/' . $channel['channel_address'] . '/image/' . $photo_hash . ']'
- . '[zmg=' . $width_x_height. ']' . z_root() . "/photo/{$photo_hash}-{$smallest}.".$ph->getExt() . '[/zmg]'
+ . $tag . z_root() . "/photo/{$photo_hash}-{$smallest}.".$ph->getExt() . '[/zmg]'
. '[/zrl]';
$result = item_store($arr);