From db8ebc9f375478bddc0f48d972e3acfbde80685a Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 9 Jan 2014 15:45:17 -0800 Subject: some minor cleanup on plinks for some very subtle permissions issues --- mod/photos.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'mod/photos.php') diff --git a/mod/photos.php b/mod/photos.php index 51a680828..8099c71e6 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -472,7 +472,7 @@ function photos_post(&$a) { $mid = item_message_id(); $arr = array(); - +//FIXME $arr['uid'] = $page_owner_uid; $arr['mid'] = $mid; $arr['parent_mid'] = $mid; @@ -511,6 +511,13 @@ function photos_post(&$a) { . $a->get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource_id'] . ''; $arr['target'] .= '' . xmlify('' . "\n" . '') . ''; + if ((! $arr['plink']) && ($arr['item_flags'] & ITEM_THREAD_TOP)) { + $arr['plink'] = z_root() . '/channel/' . $owner_record['channel_address'] . '/?f=&mid=' . $arr['mid']; + } + + + + $post = item_store($arr); $item_id = $post['item_id']; -- cgit v1.2.3