Skip to content

Commit

Permalink
GitHub:11728 (fix issue #12251)
Browse files Browse the repository at this point in the history
  • Loading branch information
yannicktrinh committed Dec 13, 2024
1 parent cf200f4 commit 59d8688
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Project/Sources/Classes/Office365Calendar.4dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Class constructor($inProvider : cs.OAuth2Provider; $inParameters : Object)
Function _getURLParamsFromObject($inParameters : Object; $inCount : Boolean) : Text

var $URL : Text:=Super._getURLParamsFromObject($inParameters; $inCount)
var $delimiter : Text:=(Position("&";$URL)>0) ? "&" : "?"
var $delimiter : Text:=(Position("&"; $URL)>0) ? "&" : "?"

If (Length(String($inParameters.startDateTime))>0)
$URL+=$delimiter+"startDateTime="+cs.Tools.me.urlEncode(inParameters.startDateTime)
Expand All @@ -25,7 +25,7 @@ Function _getURLParamsFromObject($inParameters : Object; $inCount : Boolean) : T
$URL+=$delimiter+"endDateTime="+cs.Tools.me.urlEncode(inParameters.endDateTime)
$delimiter:="&"
End if

return $result


Expand Down Expand Up @@ -182,18 +182,18 @@ Function getEvents($inParameters : Object) : Object
Else
$urlParams+="me"
End if
If (Length(String($inParameters.calendarId))>0)
If ((Value type($inParameters.calendarId)=Is text) && (Length(String($inParameters.calendarId))>0))
$urlParams+="/calendars/"+$inParameters.calendarId
Else
$urlParams+="/calendar"
End if
$urlParams+="/events"+This._getURLParamsFromObject($inParameters)

var $prefer : Text:=""
If (Length(String($inParameters.timeZone))>0)
If ((Value type($inParameters.timeZone)=Is text) && (Length(String($inParameters.timeZone))>0))
$prefer+="outlook.timezone="+$inParameters.timeZone
End if
If (Length(String($inParameters.bodyContentType))>0)
If ((Value type($inParameters.bodyContentType)=Is text) && (Length(String($inParameters.bodyContentType))>0))
$prefer+=((Length($prefer)>0) ? "; " : "")+"outlook.body-content-type="+$inParameters.bodyContentType+" "
End if
If (Length($prefer)>0)
Expand Down

0 comments on commit 59d8688

Please sign in to comment.