aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-01-09 15:45:17 -0800
committerfriendica <info@friendica.com>2014-01-09 15:45:17 -0800
commitdb8ebc9f375478bddc0f48d972e3acfbde80685a (patch)
tree62063483f438fbab8e399e5a5a3550f953f09d13 /mod/photos.php
parentba0fdde51cbaf12d0bf9f28c6f95421e5fadc695 (diff)
downloadvolse-hubzilla-db8ebc9f375478bddc0f48d972e3acfbde80685a.tar.gz
volse-hubzilla-db8ebc9f375478bddc0f48d972e3acfbde80685a.tar.bz2
volse-hubzilla-db8ebc9f375478bddc0f48d972e3acfbde80685a.zip
some minor cleanup on plinks for some very subtle permissions issues
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php9
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'];