aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Storage/File.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Storage/File.php')
-rw-r--r--Zotlabs/Storage/File.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/Zotlabs/Storage/File.php b/Zotlabs/Storage/File.php
index a4bf3f49d..897f24edd 100644
--- a/Zotlabs/Storage/File.php
+++ b/Zotlabs/Storage/File.php
@@ -84,6 +84,20 @@ class File extends DAV\Node implements DAV\IFile {
dbesc($this->data['hash']),
intval($this->data['id'])
);
+
+ if($this->data->is_photo) {
+ $r = q("update photo set filename = '%s' where resource_id = '%s' and uid = %d",
+ dbesc($newName),
+ dbesc($this->data['hash']),
+ intval($this->auth->owner_id)
+ );
+ }
+ $ch = channelx_by_n($this->auth->owner_id);
+ if($ch) {
+ $sync = attach_export_data($ch,$this->data['hash']);
+ if($sync)
+ build_sync_packet($ch['channel_id'],array('file' => array($sync)));
+ }
}
/**
@@ -205,6 +219,12 @@ class File extends DAV\Node implements DAV\IFile {
return;
}
}
+
+ $sync = attach_export_data($c[0],$this->data['hash']);
+
+ if($sync)
+ build_sync_packet($c[0]['channel_id'],array('file' => array($sync)));
+
}
/**
@@ -318,5 +338,12 @@ class File extends DAV\Node implements DAV\IFile {
}
attach_delete($this->auth->owner_id, $this->data['hash']);
+
+ $ch = channelx_by_n($this->auth->owner_id);
+ if($ch) {
+ $sync = attach_export_data($ch,$this->data['hash'],true);
+ if($sync)
+ build_sync_packet($ch['channel_id'],array('file' => array($sync)));
+ }
}
}