diff options
author | friendica <info@friendica.com> | 2015-04-23 19:49:41 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-04-23 19:49:41 -0700 |
commit | 6679734135fb04f4a7beccb81663bf1e9574f062 (patch) | |
tree | 887488543d98b5dd297d917718bdd99844e83ba5 /mod/filestorage.php | |
parent | 08b757a22cd2804bfec8ecf682b6987b8c06ca49 (diff) | |
parent | c696860cc53bc25558d83de5eda65d9b583da382 (diff) | |
download | volse-hubzilla-6679734135fb04f4a7beccb81663bf1e9574f062.tar.gz volse-hubzilla-6679734135fb04f4a7beccb81663bf1e9574f062.tar.bz2 volse-hubzilla-6679734135fb04f4a7beccb81663bf1e9574f062.zip |
Merge branch 'master' into tres
Conflicts:
include/Contact.php
include/ItemObject.php
include/api.php
include/attach.php
include/diaspora.php
include/dir_fns.php
include/enotify.php
include/event.php
include/expire.php
include/items.php
include/notifier.php
include/notify.php
include/photos.php
include/taxonomy.php
include/text.php
include/widgets.php
include/zot.php
mod/admin.php
mod/channel.php
mod/dirsearch.php
mod/display.php
mod/editwebpage.php
mod/events.php
mod/home.php
mod/item.php
mod/manage.php
mod/mood.php
mod/network.php
mod/page.php
mod/photos.php
mod/ping.php
mod/post.php
mod/thing.php
mod/viewsrc.php
view/css/mod_events.css
Diffstat (limited to 'mod/filestorage.php')
-rw-r--r-- | mod/filestorage.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/mod/filestorage.php b/mod/filestorage.php index 92474f336..8b52c086b 100644 --- a/mod/filestorage.php +++ b/mod/filestorage.php @@ -21,7 +21,7 @@ function filestorage_post(&$a) { $recurse = ((x($_POST, 'recurse')) ? intval($_POST['recurse']) : 0); $resource = ((x($_POST, 'filehash')) ? notags($_POST['filehash']) : ''); - $no_activity = ((x($_POST, 'no_activity')) ? intval($_POST['no_activity']) : 0); + $notify = ((x($_POST, 'notify')) ? intval($_POST['notify']) : 0); if(! $resource) { notice(t('Item not found.') . EOL); @@ -32,15 +32,16 @@ function filestorage_post(&$a) { $str_contact_allow = perms2str($_REQUEST['contact_allow']); $str_group_deny = perms2str($_REQUEST['group_deny']); $str_contact_deny = perms2str($_REQUEST['contact_deny']); - - attach_change_permissions($channel_id, $resource, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny, $recurse); - //Build directory tree and redirect $channel = $a->get_channel(); $cloudPath = get_parent_cloudpath($channel_id, $channel['channel_address'], $resource); + + //get the object before permissions change so we can catch eventual former allowed members $object = get_file_activity_object($channel_id, $resource, $cloudPath); - file_activity($channel_id, $object, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny, 'post', $no_activity); + attach_change_permissions($channel_id, $resource, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny, $recurse); + + file_activity($channel_id, $object, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny, 'post', $notify); goaway($cloudPath); } @@ -147,15 +148,15 @@ function filestorage_content(&$a) { '$aclselect' => $aclselect_e, '$lockstate' => $lockstate, '$permset' => t('Set/edit permissions'), - '$recurse' => t('Include all files and sub folders'), + '$recurse' => array('recurse', t('Include all files and sub folders'), 0, '', array(t('No'), t('Yes'))), '$backlink' => t('Return to file list'), '$isadir' => $is_a_dir, '$cpdesc' => t('Copy/paste this code to attach file to a post'), '$cpldesc' => t('Copy/paste this URL to link file from a web page'), '$submit' => t('Submit'), - '$attach_btn_title' => t('Attach this file to a new post'), + '$attach_btn_title' => t('Share this file'), '$link_btn_title' => t('Show URL to this file'), - '$activity_btn_title' => t('Do not show in shared with me folder of your connections') + '$notify' => array('notify', t('Notify your contacts about this file'), 0, '', array(t('No'), t('Yes'))) )); echo $o; |