diff options
Diffstat (limited to 'mod/photos.php')
-rw-r--r-- | mod/photos.php | 9 |
1 files changed, 8 insertions, 1 deletions
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'] . '</id>'; $arr['target'] .= '<link>' . xmlify('<link rel="alternate" type="text/html" href="' . $a->get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource_id'] . '" />' . "\n" . '<link rel="preview" type="'.$p[0]['type'].'" href="' . $a->get_baseurl() . "/photo/" . $p[0]['resource_id'] . '-' . $best . '.' . $ext . '" />') . '</link></target>'; + 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']; |