diff options
author | Mario <mario@mariovavti.com> | 2023-07-11 18:57:18 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-07-11 18:57:18 +0000 |
commit | 63fb8d03929189bfc8cbf53d23cb79984fe2c3cd (patch) | |
tree | b9f74bd8c7721dca7ece251fdbb9a7c4fe9b949a /Zotlabs/Module/Wall_attach.php | |
parent | 57796a2f962d045445cbf69237bb3d6786e4d0d4 (diff) | |
parent | 384de0925e502cfa8fe6ca287530ef5529fdff10 (diff) | |
download | volse-hubzilla-63fb8d03929189bfc8cbf53d23cb79984fe2c3cd.tar.gz volse-hubzilla-63fb8d03929189bfc8cbf53d23cb79984fe2c3cd.tar.bz2 volse-hubzilla-63fb8d03929189bfc8cbf53d23cb79984fe2c3cd.zip |
Merge branch '8.6RC'8.6
Diffstat (limited to 'Zotlabs/Module/Wall_attach.php')
-rw-r--r-- | Zotlabs/Module/Wall_attach.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Zotlabs/Module/Wall_attach.php b/Zotlabs/Module/Wall_attach.php index 2c0eeec77..80892f0f3 100644 --- a/Zotlabs/Module/Wall_attach.php +++ b/Zotlabs/Module/Wall_attach.php @@ -18,10 +18,10 @@ class Wall_attach extends \Zotlabs\Web\Controller { function post() { - + $using_api = false; - $result = []; + $result = []; if($_REQUEST['api_source'] && array_key_exists('media',$_FILES)) { $using_api = true; @@ -69,7 +69,7 @@ class Wall_attach extends \Zotlabs\Web\Controller { ]; } } - else { + else { if(! array_key_exists('userfile',$_FILES)) { $_FILES['userfile'] = [ 'name' => $_FILES['files']['name'], @@ -82,18 +82,18 @@ 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, 'allow_cid' => '<' . $channel['channel_hash'] . '>')); + + $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'] . '>')); if(! $r['success']) { notice( $r['message'] . EOL); killme(); } - + if(intval($r['data']['is_photo'])) { $s = "\n\n" . $r['body'] . "\n\n"; } @@ -130,7 +130,7 @@ class Wall_attach extends \Zotlabs\Web\Controller { logger('unable to read svg data file: ' . 'store/' . $channel['channel_address'] . '/' . $r['data']['os_path']); } } - + $s .= "\n\n" . '[attachment]' . $r['data']['hash'] . ',' . $r['data']['revision'] . '[/attachment]' . "\n"; } @@ -144,8 +144,8 @@ class Wall_attach extends \Zotlabs\Web\Controller { $result['message'] = $s; json_return_and_die($result); - + } - + } |