aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-03-23 09:56:46 +0000
committerMario <mario@mariovavti.com>2021-03-23 09:56:46 +0000
commit2856ea6370ad58c5e33dc558837d19b9fc868d31 (patch)
tree18b9b0ab815380117da514ec43e36126f52c8256 /Zotlabs
parent872ac8846ef40cd91d8ebb8a9cf7279a64e87942 (diff)
parent67d65d878dca79e5f14ab1522505411ca7c73842 (diff)
downloadvolse-hubzilla-2856ea6370ad58c5e33dc558837d19b9fc868d31.tar.gz
volse-hubzilla-2856ea6370ad58c5e33dc558837d19b9fc868d31.tar.bz2
volse-hubzilla-2856ea6370ad58c5e33dc558837d19b9fc868d31.zip
Merge branch 'dev' into air
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Cdav.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/Zotlabs/Module/Cdav.php b/Zotlabs/Module/Cdav.php
index fe697a526..a6cab8639 100644
--- a/Zotlabs/Module/Cdav.php
+++ b/Zotlabs/Module/Cdav.php
@@ -135,7 +135,7 @@ class Cdav extends Controller {
$auth = new \Zotlabs\Storage\BasicAuth();
$auth->setRealm(ucfirst(\Zotlabs\Lib\System::get_platform_name()) . 'CalDAV/CardDAV');
- if (local_channel()) {
+ if(local_channel()) {
logger('loggedin');
@@ -151,15 +151,15 @@ class Cdav extends Controller {
if($channel['channel_timezone'])
$auth->setTimezone($channel['channel_timezone']);
$auth->observer = $channel['channel_hash'];
+ }
+ else
+ $channel = channelx_by_nick(argv(2));
- $principalUri = 'principals/' . $channel['channel_address'];
- if(!cdav_principal($principalUri)) {
- $this->activate($pdo, $channel);
- if(!cdav_principal($principalUri)) {
- return;
- }
- }
-
+ $principalUri = 'principals/' . $channel['channel_address'];
+ if(! cdav_principal($principalUri)) {
+ $this->activate($pdo, $channel);
+ if(! cdav_principal($principalUri))
+ return;
}
// Track CDAV updates from remote clients
@@ -173,11 +173,11 @@ class Cdav extends Controller {
logger("debug: method: " . $httpmethod, LOGGER_DEBUG);
logger("debug: uri: " . $httpuri, LOGGER_DEBUG);
- if(strpos($httpuri, 'cdav/addressbooks')) {
+ if(strpos($httpuri, 'cdav/addressbooks') !== false) {
$sync = 'addressbook';
$cdavtable = 'addressbooks';
}
- elseif(strpos($httpuri, 'cdav/calendars')) {
+ elseif(strpos($httpuri, 'cdav/calendars') !== false) {
$sync = 'calendar';
$cdavtable = 'calendarinstances';
}
@@ -191,7 +191,7 @@ class Cdav extends Controller {
logger("debug: body: " . $httpbody, LOGGER_DEBUG);
- if($x = get_cdav_id($principalUri, explode("/", $httpuri)[4], $cdavtable)) {
+ if($x = get_cdav_id($principalUri, argv(3), $cdavtable)) {
$cdavdata = $this->get_cdav_data($x['id'], $cdavtable);