aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/attach.php8
-rw-r--r--include/reddav.php12
2 files changed, 13 insertions, 7 deletions
diff --git a/include/attach.php b/include/attach.php
index f5eaaa448..fdb9c0d56 100644
--- a/include/attach.php
+++ b/include/attach.php
@@ -552,9 +552,9 @@ function z_readdir($channel_id, $observer_hash, $pathname, $parent_hash = '') {
/**
* @function attach_mkdir($channel,$observer_hash,$arr);
- *
+ *
* @brief Create directory.
- *
+ *
* @param $channel channel array of owner
* @param $observer_hash hash of current observer
* @param $arr parameter array to fulfil request
@@ -641,7 +641,7 @@ function attach_mkdir($channel, $observer_hash, $arr = null) {
$path .= $arr['hash'];
- $created = datetime_convert();
+ $created = datetime_convert();
$r = q("INSERT INTO attach ( aid, uid, hash, creator, filename, filetype, filesize, revision, folder, flags, data, created, edited, allow_cid, allow_gid, deny_cid, deny_gid )
VALUES ( %d, %d, '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ",
@@ -678,7 +678,7 @@ function attach_mkdir($channel, $observer_hash, $arr = null) {
$ret['message'] = t('database storage failed.');
return $ret;
-
+
}
/**
diff --git a/include/reddav.php b/include/reddav.php
index c9b238efb..2c2ddcb1c 100644
--- a/include/reddav.php
+++ b/include/reddav.php
@@ -113,8 +113,13 @@ class RedDirectory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
throw new DAV\Exception\NotFound('The file with name: ' . $name . ' could not be found.');
}
+ /**
+ * @brief Returns the name of the directory.
+ *
+ * @return string
+ */
public function getName() {
- logger('RedDirectory::getName returns: ' . basename($this->red_path), LOGGER_DATA);
+ logger('RedDirectory::getName() returns: ' . basename($this->red_path), LOGGER_DATA);
return (basename($this->red_path));
}
@@ -204,7 +209,7 @@ class RedDirectory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
);
// update the folder's lastmodified timestamp
- $e = q("UPDATE attach SET edited = '%s' WHERE folder = '%s' AND uid = %d LIMIT 1",
+ $e = q("UPDATE attach SET edited = '%s' WHERE hash = '%s' AND uid = %d LIMIT 1",
dbesc($edited),
dbesc($this->folder_hash),
intval($c[0]['channel_id'])
@@ -250,8 +255,9 @@ class RedDirectory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
if ($r) {
$result = attach_mkdir($r[0], $this->auth->observer, array('filename' => $name, 'folder' => $this->folder_hash));
- if (! $result['success'])
+ if (! $result['success']) {
logger('RedDirectory::createDirectory(): ' . print_r($result, true), LOGGER_DEBUG);
+ }
}
}