From f5467a6d511c2fbf2ba88e026f75e8a304a9ab2d Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Tue, 25 Mar 2014 04:24:26 +0000 Subject: Fix wall photo uploads. --- include/photos.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/photos.php') 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); -- cgit v1.2.3