From 662316e6873fa8152bb96b172c42ca424cb5fbd3 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 27 Mar 2018 21:13:14 -0700 Subject: update folder timestamp on uploaded files (fixme - we need to recurse back to the storage root but that is for another day) --- include/attach.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/attach.php b/include/attach.php index 39269eb03..363005029 100644 --- a/include/attach.php +++ b/include/attach.php @@ -948,6 +948,16 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) { return $ret; } + // Update the folder timestamp @todo recurse to the storage root folder + + if($folder_hash) { + q("UPDATE attach set edited = '%s' where hash = '%s' and uid = %d and is_dir = 1", + dbesc($edited), + dbesc($folder_hash), + intval($channel_id) + ); + } + // Caution: This re-uses $sql_options set further above $r = q("select * from attach where uid = %d and hash = '%s' $sql_options limit 1", -- cgit v1.2.3