mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 16:33:17 +01:00
* Calendar/eSync/eMail: fix not working accept/reject on calendar items (mails was working before)
This commit is contained in:
parent
54317da546
commit
6b85ca7a01
@ -388,12 +388,12 @@ return array(); // temporary disabling meeting requests from calendar
|
|||||||
* Process response to meeting request
|
* Process response to meeting request
|
||||||
*
|
*
|
||||||
* @see BackendDiff::MeetingResponse()
|
* @see BackendDiff::MeetingResponse()
|
||||||
* @param int|string $requestid uid of mail with meeting request, or < 0 for cal_id, or string with iCal from fmail plugin
|
|
||||||
* @param string $folderid folder of meeting request mail
|
* @param string $folderid folder of meeting request mail
|
||||||
|
* @param int|string $requestid cal_id, or string with iCal from fmail plugin
|
||||||
* @param int $response 1=accepted, 2=tentative, 3=decline
|
* @param int $response 1=accepted, 2=tentative, 3=decline
|
||||||
* @return int|boolean id of calendar item, false on error
|
* @return int|boolean id of calendar item, false on error
|
||||||
*/
|
*/
|
||||||
function MeetingResponse($requestid, $folderid, $response)
|
function MeetingResponse($folderid, $requestid, $response)
|
||||||
{
|
{
|
||||||
if (!isset($this->calendar)) $this->calendar = new calendar_boupdate();
|
if (!isset($this->calendar)) $this->calendar = new calendar_boupdate();
|
||||||
|
|
||||||
@ -432,11 +432,6 @@ return array(); // temporary disabling meeting requests from calendar
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif($requestid > 0) // uid from mail --> let fmail plugin call us
|
|
||||||
{
|
|
||||||
debugLog(__METHOD__."('$requestid', '$folderid', $response) returning NULL (fmail uid)");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
elseif (!($event = $this->calendar->read(abs($requestid), 0, false, 'server')))
|
elseif (!($event = $this->calendar->read(abs($requestid), 0, false, 'server')))
|
||||||
{
|
{
|
||||||
debugLog(__METHOD__."('$requestid', '$folderid', $response) returning FALSE");
|
debugLog(__METHOD__."('$requestid', '$folderid', $response) returning FALSE");
|
||||||
|
@ -1353,21 +1353,19 @@ class felamimail_activesync implements activesync_plugin_write, activesync_plugi
|
|||||||
* fmail plugin only extracts the iCal attachment and let's calendar plugin deal with adding it
|
* fmail plugin only extracts the iCal attachment and let's calendar plugin deal with adding it
|
||||||
*
|
*
|
||||||
* @see BackendDiff::MeetingResponse()
|
* @see BackendDiff::MeetingResponse()
|
||||||
* @param int|string $requestid uid of mail with meeting request, or < 0 for cal_id or string with iCal
|
|
||||||
* @param string $folderid folder of meeting request mail
|
* @param string $folderid folder of meeting request mail
|
||||||
|
* @param int|string $requestid uid of mail with meeting request
|
||||||
* @param int $response 1=accepted, 2=tentative, 3=decline
|
* @param int $response 1=accepted, 2=tentative, 3=decline
|
||||||
* @return int|boolean id of calendar item, false on error
|
* @return int|boolean id of calendar item, false on error
|
||||||
*/
|
*/
|
||||||
function MeetingResponse($requestid, $folderid, $response)
|
function MeetingResponse($folderid, $requestid, $response)
|
||||||
{
|
{
|
||||||
if (!($requestid > 0)) return null; // let calendar plugin handle it's own meeting requests
|
|
||||||
|
|
||||||
if (!class_exists('calendar_activesync'))
|
if (!class_exists('calendar_activesync'))
|
||||||
{
|
{
|
||||||
debugLog(__METHOD__."(...) no EGroupware calendar installed!");
|
debugLog(__METHOD__."(...) no EGroupware calendar installed!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (!($requestid > 0) || !($stat = $this->StatMessage($folderid, $requestid)))
|
if (!($stat = $this->StatMessage($folderid, $requestid)))
|
||||||
{
|
{
|
||||||
debugLog(__METHOD__."($requestid, '$folderid', $response) returning FALSE (can NOT stat message)");
|
debugLog(__METHOD__."($requestid, '$folderid', $response) returning FALSE (can NOT stat message)");
|
||||||
return false;
|
return false;
|
||||||
@ -1381,7 +1379,9 @@ class felamimail_activesync implements activesync_plugin_write, activesync_plugi
|
|||||||
debugLog(__METHOD__."($requestid, '$folderid', $response) iCal found, calling now backend->MeetingResponse('$attachment[attachment]')");
|
debugLog(__METHOD__."($requestid, '$folderid', $response) iCal found, calling now backend->MeetingResponse('$attachment[attachment]')");
|
||||||
|
|
||||||
// calling backend again with iCal attachment, to let calendar add the event
|
// calling backend again with iCal attachment, to let calendar add the event
|
||||||
if (($ret = $this->backend->MeetingResponse($attachment['attachment'], $folderid, $response, $calendarid)))
|
if (($ret = $this->backend->MeetingResponse($attachment['attachment'],
|
||||||
|
$this->backend->createID('calendar',$GLOBALS['egw_info']['user']['account_id']),
|
||||||
|
$response, $calendarid)))
|
||||||
{
|
{
|
||||||
$ret = $calendarid;
|
$ret = $calendarid;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user