diff options
author | Klaus Weidenbach <Klaus.Weidenbach@gmx.net> | 2014-06-29 16:00:21 +0200 |
---|---|---|
committer | Klaus Weidenbach <Klaus.Weidenbach@gmx.net> | 2014-06-29 16:00:21 +0200 |
commit | 5be3ba8436cbe998bdadc2404ebc7aafa05f94df (patch) | |
tree | 025b2edf9e5f75015759b988c0a5b130639a895a /include/reddav.php | |
parent | 628f1218049715c8acf953dbda8f902b3902cc2f (diff) | |
download | volse-hubzilla-5be3ba8436cbe998bdadc2404ebc7aafa05f94df.tar.gz volse-hubzilla-5be3ba8436cbe998bdadc2404ebc7aafa05f94df.tar.bz2 volse-hubzilla-5be3ba8436cbe998bdadc2404ebc7aafa05f94df.zip |
Fixed a wrong timestamp update when adding a file.
When a file was uploaded the timestamp of the containing folder
should get updated, but the timestamp of the first file in the
folder was mistakenly updated.
There are some more wrong timestamps, but still looking for the bug.
Diffstat (limited to 'include/reddav.php')
-rw-r--r-- | include/reddav.php | 12 |
1 files changed, 9 insertions, 3 deletions
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); + } } } |