aboutsummaryrefslogtreecommitdiffstats
path: root/include/attach.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-01-05 16:00:05 -0800
committerfriendica <info@friendica.com>2014-01-05 16:00:05 -0800
commit061894d37f9883c8c5033a2e75337660dbc39ad9 (patch)
tree4fa019d65ee90c5516afc37dcab812869ddb156d /include/attach.php
parentd920e212ac40e3a67ec01dcc9926acbf4b844cf5 (diff)
downloadvolse-hubzilla-061894d37f9883c8c5033a2e75337660dbc39ad9.tar.gz
volse-hubzilla-061894d37f9883c8c5033a2e75337660dbc39ad9.tar.bz2
volse-hubzilla-061894d37f9883c8c5033a2e75337660dbc39ad9.zip
reddav - basic mkdir support - needs more work to be robust
Diffstat (limited to 'include/attach.php')
-rw-r--r--include/attach.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/include/attach.php b/include/attach.php
index 3eb7a9366..cd211f2a2 100644
--- a/include/attach.php
+++ b/include/attach.php
@@ -526,11 +526,14 @@ function attach_mkdir($channel,$observer_hash,$arr = null) {
$sql_options = '';
$basepath = 'store/' . $channel['channel_address'];
+
+ logger('attach_mkdir: basepath: ' . $basepath);
+
if(! is_dir($basepath))
- @mkdir($basepath,STORAGE_DEFAULT_PERMISSIONS,true);
+ mkdir($basepath,STORAGE_DEFAULT_PERMISSIONS,true);
- if(! perm_is_allowed($channel_id, get_observer_hash(),'write_storage')) {
+ if(! perm_is_allowed($channel_id, $observer_hash,'write_storage')) {
$ret['message'] = t('Permission denied.');
return $ret;
}
@@ -607,10 +610,10 @@ function attach_mkdir($channel,$observer_hash,$arr = null) {
dbesc(''),
dbesc($created),
dbesc($created),
- dbesc(($arr && array_key_exists('allow_cid',$arr)) ? $arr['allow_cid'] : ''),
- dbesc(($arr && array_key_exists('allow_gid',$arr)) ? $arr['allow_gid'] : ''),
- dbesc(($arr && array_key_exists('deny_cid',$arr)) ? $arr['deny_cid'] : ''),
- dbesc(($arr && array_key_exists('deny_gid',$arr)) ? $arr['deny_gid'] : '')
+ dbesc(($arr && array_key_exists('allow_cid',$arr)) ? $arr['allow_cid'] : $channel['channel_allow_cid']),
+ dbesc(($arr && array_key_exists('allow_gid',$arr)) ? $arr['allow_gid'] : $channel['channel_allow_gid']),
+ dbesc(($arr && array_key_exists('deny_cid',$arr)) ? $arr['deny_cid'] : $channel['channel_deny_cid']),
+ dbesc(($arr && array_key_exists('deny_gid',$arr)) ? $arr['deny_gid'] : $channel['channel_deny_gid'])
);
if($r) {