aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Storage/Directory.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Storage/Directory.php')
-rw-r--r--Zotlabs/Storage/Directory.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/Zotlabs/Storage/Directory.php b/Zotlabs/Storage/Directory.php
index 3c0cff6ef..06ae90a5f 100644
--- a/Zotlabs/Storage/Directory.php
+++ b/Zotlabs/Storage/Directory.php
@@ -194,7 +194,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
* @return null|string ETag
*/
public function createFile($name, $data = null) {
- logger($name, LOGGER_DEBUG);
+ logger('create file in directory ' . $name, LOGGER_DEBUG);
if (! $this->auth->owner_id) {
logger('permission denied ' . $name);
@@ -246,7 +246,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
$deny_gid = $c[0]['channel_deny_gid'];
}
- $r = q("INSERT INTO attach ( aid, uid, hash, creator, filename, folder, os_storage, filetype, filesize, revision, is_photo, data, created, edited, allow_cid, allow_gid, deny_cid, deny_gid )
+ $r = q("INSERT INTO attach ( aid, uid, hash, creator, filename, folder, os_storage, filetype, filesize, revision, is_photo, content, created, edited, allow_cid, allow_gid, deny_cid, deny_gid )
VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ",
intval($c[0]['channel_account_id']),
intval($c[0]['channel_id']),
@@ -358,7 +358,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
* @return void
*/
public function createDirectory($name) {
- logger($name, LOGGER_DEBUG);
+ logger('create directory ' . $name, LOGGER_DEBUG);
if ((! $this->auth->owner_id) || (! perm_is_allowed($this->auth->owner_id, $this->auth->observer, 'write_storage'))) {
throw new DAV\Exception\Forbidden('Permission denied.');
@@ -372,7 +372,9 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
$result = attach_mkdir($r[0], $this->auth->observer, array('filename' => $name, 'folder' => $this->folder_hash));
if($result['success']) {
- $sync = attach_export_data($r[0],$ret['data']['hash']);
+ $sync = attach_export_data($r[0],$result['data']['hash']);
+ logger('createDirectory: attach_export_data returns $sync:' . print_r($sync, true), LOGGER_DEBUG);
+
if($sync) {
build_sync_packet($r[0]['channel_id'],array('file' => array($sync)));
}
@@ -563,4 +565,4 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
$free
);
}
-} \ No newline at end of file
+}