use the explicit form of build_sync_packet so that file/photo sync will work even when the actual observer is a guest (with permission to upload).
This commit is contained in:
parent
861f5232d3
commit
aa0412d83b
@ -335,6 +335,12 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
|
||||
$p = photo_upload($c[0],\App::get_observer(),$args);
|
||||
}
|
||||
|
||||
$sync = attach_export_data($c[0],$hash);
|
||||
|
||||
if($sync)
|
||||
build_sync_packet($c[0]['channel_id'],array('file' => array($sync)));
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -205,6 +205,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)));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -868,7 +868,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
|
||||
$sync = attach_export_data($channel,$hash);
|
||||
|
||||
if($sync)
|
||||
build_sync_packet(0,array('file' => array($sync)));
|
||||
build_sync_packet($channel['channel_id'],array('file' => array($sync)));
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user