diff options
author | friendica <info@friendica.com> | 2014-12-30 15:25:06 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-12-30 15:25:06 -0800 |
commit | abd345f80f5074d325fd137e48a23925eaa66802 (patch) | |
tree | c5a469a001b2eb9ae5482b93b557a42e3181208f /mod/filestorage.php | |
parent | 2f650b74d35335815c48537cd03c81cc92a3c4f8 (diff) | |
parent | ae9d08267c632cae36a4ebd34c2077fd0051e0e7 (diff) | |
download | volse-hubzilla-abd345f80f5074d325fd137e48a23925eaa66802.tar.gz volse-hubzilla-abd345f80f5074d325fd137e48a23925eaa66802.tar.bz2 volse-hubzilla-abd345f80f5074d325fd137e48a23925eaa66802.zip |
Merge branch 'master' into trinidad
Diffstat (limited to 'mod/filestorage.php')
-rw-r--r-- | mod/filestorage.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mod/filestorage.php b/mod/filestorage.php index 1767ea6bf..6b731e440 100644 --- a/mod/filestorage.php +++ b/mod/filestorage.php @@ -32,7 +32,7 @@ function filestorage_post(&$a) { $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 = false); + 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(); @@ -127,10 +127,14 @@ function filestorage_content(&$a) { $lockstate = (($f['allow_cid'] || $f['allow_gid'] || $f['deny_cid'] || $f['deny_gid']) ? 'lock' : 'unlock'); + // Encode path that is used for link so it's a valid URL + // Keep slashes as slashes, otherwise mod_rewrite doesn't work correctly + $encoded_path = str_replace('%2F', '/', rawurlencode($cloudpath)); + $o = replace_macros(get_markup_template('attach_edit.tpl'), array( '$header' => t('Edit file permissions'), '$file' => $f, - '$cloudpath' => z_root() . '/' . $cloudpath, + '$cloudpath' => z_root() . '/' . $encoded_path, '$parentpath' => $parentpath, '$uid' => $channel['channel_id'], '$channelnick' => $channel['channel_address'], |