Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
z-push
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Björn Fischer
z-push
Commits
a007c61d
Commit
a007c61d
authored
May 04, 2018
by
Björn Fischer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
convert binary data to string
parent
b48c459f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
caldav.php
src/backend/caldav/caldav.php
+22
-1
No files found.
src/backend/caldav/caldav.php
View file @
a007c61d
...
@@ -99,7 +99,9 @@ class BackendCalDAV extends BackendDiff {
...
@@ -99,7 +99,9 @@ class BackendCalDAV extends BackendDiff {
if
(
$items
[
'count'
]
>
0
)
{
if
(
$items
[
'count'
]
>
0
)
{
ZLog
::
Write
(
LOGLEVEL_DEBUG
,
sprintf
(
"BackendIMAP->getIdentityFromLdap() - Found entry in LDAP. Generating From"
));
ZLog
::
Write
(
LOGLEVEL_DEBUG
,
sprintf
(
"BackendIMAP->getIdentityFromLdap() - Found entry in LDAP. Generating From"
));
// We get the first object. It's your responsability to make the query unique
// We get the first object. It's your responsability to make the query unique
$caldav_path
=
str_replace
(
'%i'
,
$items
[
0
][
CALDAV_IDENTITY_LDAP_IDENTIFIER
][
0
],
$caldav_path
);
$identity
=
CALDAV_IDENTITY_LDAP_IDENTIFIER
===
"objectguid"
?
$this
->
convertObjectGUID2Str
(
$items
[
0
][
CALDAV_IDENTITY_LDAP_IDENTIFIER
][
0
])
:
$items
[
0
][
CALDAV_IDENTITY_LDAP_IDENTIFIER
][
0
]
$caldav_path
=
str_replace
(
'%i'
,
,
$caldav_path
);
}
}
else
{
else
{
ZLog
::
Write
(
LOGLEVEL_DEBUG
,
sprintf
(
"BackendIMAP->getIdentityFromLdap() - No entry found in LDAP"
));
ZLog
::
Write
(
LOGLEVEL_DEBUG
,
sprintf
(
"BackendIMAP->getIdentityFromLdap() - No entry found in LDAP"
));
...
@@ -123,6 +125,25 @@ class BackendCalDAV extends BackendDiff {
...
@@ -123,6 +125,25 @@ class BackendCalDAV extends BackendDiff {
return
$caldav_path
;
return
$caldav_path
;
}
}
private
function
convertObjectGUID2Str
(
$oguid
)
{
$hex_guid
=
bin2hex
(
$oguid
);
$hex_guid_to_guid_str
=
''
;
for
(
$k
=
1
;
$k
<=
4
;
++
$k
)
{
$hex_guid_to_guid_str
.=
substr
(
$hex_guid
,
8
-
2
*
$k
,
2
);
}
$hex_guid_to_guid_str
.=
'-'
;
for
(
$k
=
1
;
$k
<=
2
;
++
$k
)
{
$hex_guid_to_guid_str
.=
substr
(
$hex_guid
,
12
-
2
*
$k
,
2
);
}
$hex_guid_to_guid_str
.=
'-'
;
for
(
$k
=
1
;
$k
<=
2
;
++
$k
)
{
$hex_guid_to_guid_str
.=
substr
(
$hex_guid
,
16
-
2
*
$k
,
2
);
}
$hex_guid_to_guid_str
.=
'-'
.
substr
(
$hex_guid
,
16
,
4
);
$hex_guid_to_guid_str
.=
'-'
.
substr
(
$hex_guid
,
20
);
return
strtoupper
(
$hex_guid_to_guid_str
);
}
/**
/**
* The connections to CalDAV are always directly closed. So nothing special needs to happen here.
* The connections to CalDAV are always directly closed. So nothing special needs to happen here.
* @see IBackend::Logoff()
* @see IBackend::Logoff()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment