aboutsummaryrefslogtreecommitdiffstats
path: root/include/attach.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-03-27 21:13:14 -0700
committerzotlabs <mike@macgirvin.com>2018-03-27 21:13:14 -0700
commit662316e6873fa8152bb96b172c42ca424cb5fbd3 (patch)
treeaf0cbe5b69a3562dc9aa10493bd3c311e7c26c2c /include/attach.php
parent14383a4c4aac4fc1b62e3dca25f9a2783cdd154c (diff)
downloadvolse-hubzilla-662316e6873fa8152bb96b172c42ca424cb5fbd3.tar.gz
volse-hubzilla-662316e6873fa8152bb96b172c42ca424cb5fbd3.tar.bz2
volse-hubzilla-662316e6873fa8152bb96b172c42ca424cb5fbd3.zip
update folder timestamp on uploaded files (fixme - we need to recurse back to the storage root but that is for another day)
Diffstat (limited to 'include/attach.php')
-rw-r--r--include/attach.php10
1 files changed, 10 insertions, 0 deletions
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",