diff options
author | friendica <info@friendica.com> | 2014-01-09 15:45:17 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-01-09 15:45:17 -0800 |
commit | db8ebc9f375478bddc0f48d972e3acfbde80685a (patch) | |
tree | 62063483f438fbab8e399e5a5a3550f953f09d13 /mod/mood.php | |
parent | ba0fdde51cbaf12d0bf9f28c6f95421e5fadc695 (diff) | |
download | volse-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/mood.php')
-rwxr-xr-x | mod/mood.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mod/mood.php b/mod/mood.php index 83b8bfb57..5075f622d 100755 --- a/mod/mood.php +++ b/mod/mood.php @@ -11,6 +11,7 @@ function mood_init(&$a) { return; $uid = local_user(); + $channel = $a->get_channel(); $verb = notags(trim($_GET['verb'])); if(! $verb) @@ -48,7 +49,6 @@ function mood_init(&$a) { else { $private = 0; - $channel = $a->get_channel(); $allow_cid = $channel['channel_allow_cid']; $allow_gid = $channel['channel_allow_gid']; @@ -84,6 +84,11 @@ function mood_init(&$a) { $arr['verb'] = $activity; $arr['body'] = $action; + if ((! $arr['plink']) && ($arr['item_flags'] & ITEM_THREAD_TOP)) { + $arr['plink'] = z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . $arr['mid']; + } + + $post = item_store($arr); $item_id = $post['item_id']; |