aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Wall_attach.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/Zotlabs/Module/Wall_attach.php b/Zotlabs/Module/Wall_attach.php
index 80892f0f3..0d5c9e983 100644
--- a/Zotlabs/Module/Wall_attach.php
+++ b/Zotlabs/Module/Wall_attach.php
@@ -81,13 +81,22 @@ class Wall_attach extends \Zotlabs\Web\Controller {
}
}
- $observer = \App::get_observer();
-
-
$def_album = get_pconfig($channel['channel_id'],'system','photo_path');
$def_attach = get_pconfig($channel['channel_id'],'system','attach_path');
- $r = attach_store($channel,(($observer) ? $observer['xchan_hash'] : ''),'', array('source' => 'editor', 'visible' => 0, 'album' => $def_album, 'directory' => $def_attach, 'flags' => 1, 'allow_cid' => '<' . $channel['channel_hash'] . '>'));
+ $data = [
+ 'source' => 'editor',
+ 'visible' => 0,
+ 'album' => $def_album,
+ 'directory' => $def_attach,
+ 'flags' => 1,
+ 'allow_cid' => '<' . $channel['channel_hash'] . '>',
+ 'allow_gid' => '',
+ 'deny_cid' => '',
+ 'deny_gid' => ''
+ ];
+
+ $r = attach_store($channel, get_observer_hash(), '', $data);
if(! $r['success']) {
notice( $r['message'] . EOL);