some minor cleanup on plinks for some very subtle permissions issues

This commit is contained in:
friendica
2014-01-09 15:45:17 -08:00
parent ba0fdde51c
commit db8ebc9f37
9 changed files with 43 additions and 31 deletions

View File

@@ -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'];