aboutsummaryrefslogtreecommitdiffstats
path: root/include/RedDAV/RedDirectory.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/RedDAV/RedDirectory.php')
-rw-r--r--include/RedDAV/RedDirectory.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/RedDAV/RedDirectory.php b/include/RedDAV/RedDirectory.php
index c41056ac9..1f7ba8927 100644
--- a/include/RedDAV/RedDirectory.php
+++ b/include/RedDAV/RedDirectory.php
@@ -297,8 +297,18 @@ class RedDirectory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
}
if($is_photo) {
+ $album = '';
+ if($this->folder_hash) {
+ $f1 = q("select filename from attach WHERE hash = '%s' AND uid = %d",
+ dbesc($this->folder_hash),
+ intval($c[0]['channel_id'])
+ );
+ if($f1)
+ $album = $f1[0]['filename'];
+ }
+
require_once('include/photos.php');
- $args = array( 'data' => @file_get_contents($f), 'resource_id' => $hash);
+ $args = array( 'resource_id' => $hash, 'album' => $album, 'os_path' => $f, 'filename' => $name, 'getimagesize' => $x);
$p = photo_upload($c[0],get_app()->get_observer(),$args);
}