diff options
author | git-marijus <mario@mariovavti.com> | 2017-07-31 16:59:43 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-07-31 17:30:16 +0200 |
commit | 2095937c600c1770f656ac6354340815b4fde73e (patch) | |
tree | fdde11fc4c3b02b7aa79edfbed5b3489434d7eba | |
parent | d33974cec44d7ed7a648a4e30380c3dfa3f11b2f (diff) | |
download | volse-hubzilla-2095937c600c1770f656ac6354340815b4fde73e.tar.gz volse-hubzilla-2095937c600c1770f656ac6354340815b4fde73e.tar.bz2 volse-hubzilla-2095937c600c1770f656ac6354340815b4fde73e.zip |
improve file_activity() a little
-rw-r--r-- | Zotlabs/Module/Filestorage.php | 10 | ||||
-rw-r--r-- | Zotlabs/Module/Sharedwithme.php | 5 | ||||
-rw-r--r-- | include/attach.php | 23 |
3 files changed, 9 insertions, 29 deletions
diff --git a/Zotlabs/Module/Filestorage.php b/Zotlabs/Module/Filestorage.php index 785dff394..d6f363e77 100644 --- a/Zotlabs/Module/Filestorage.php +++ b/Zotlabs/Module/Filestorage.php @@ -5,14 +5,6 @@ namespace Zotlabs\Module; * */ -require_once('include/attach.php'); - - -/** - * - * @param object &$a - */ - class Filestorage extends \Zotlabs\Web\Controller { function post() { @@ -36,7 +28,7 @@ class Filestorage extends \Zotlabs\Web\Controller { $channel = \App::get_channel(); $acl = new \Zotlabs\Access\AccessList($channel); - $acl->set_from_array($_REQUEST); + $acl->set_from_array($_POST); $x = $acl->get(); $cloudPath = get_parent_cloudpath($channel_id, $channel['channel_address'], $resource); diff --git a/Zotlabs/Module/Sharedwithme.php b/Zotlabs/Module/Sharedwithme.php index 5d6d0f7da..2c97e9726 100644 --- a/Zotlabs/Module/Sharedwithme.php +++ b/Zotlabs/Module/Sharedwithme.php @@ -4,6 +4,11 @@ require_once('include/conversation.php'); require_once('include/text.php'); +/** + * @file Zotlabs/Module/Sharedwithme.php + * + */ + class Sharedwithme extends \Zotlabs\Web\Controller { function get() { diff --git a/include/attach.php b/include/attach.php index bd18b23f2..cfea047ef 100644 --- a/include/attach.php +++ b/include/attach.php @@ -1677,17 +1677,9 @@ function file_activity($channel_id, $object, $allow_cid, $allow_gid, $deny_cid, $arr['obj'] = $u_jsonobject; $arr['body'] = ''; - $post = item_store($arr); - $item_id = $post['item_id']; - if($item_id) { - Zotlabs\Daemon\Master::Summon(array('Notifier','activity',$item_id)); - } - - call_hooks('post_local_end', $arr); + post_activity_item($arr); $update = false; - - //notice( t('File activity updated') . EOL); } //don't create new activity if notify was not enabled @@ -1712,16 +1704,7 @@ function file_activity($channel_id, $object, $allow_cid, $allow_gid, $deny_cid, $arr['obj'] = (($update) ? $u_jsonobject : $jsonobject); $arr['body'] = ''; - $post = item_store($arr); - $item_id = $post['item_id']; - - if($item_id) { - Zotlabs\Daemon\Master::Summon(array('Notifier','activity',$item_id)); - } - - call_hooks('post_local_end', $arr); - - //(($verb === 'post') ? notice( t('File activity posted') . EOL) : notice( t('File activity dropped') . EOL)); + post_activity_item($arr); return; } @@ -1887,7 +1870,7 @@ function recursive_activity_recipients($arr_allow_cid, $arr_allow_gid, $arr_deny //if none is allowed restrict to self if(($r_arr_allow_gid === false) && ($r_arr_allow_cid === false)) { - $ret['allow_cid'] = $poster['xchan_hash']; + $ret['allow_cid'] = [$poster['xchan_hash']]; } else { $ret['allow_gid'] = $r_arr_allow_gid; $ret['allow_cid'] = $r_arr_allow_cid; |