forked from extern/egroupware
* Calendar: Fix notifications show actions for alarm notify messages
This commit is contained in:
parent
9148b4665d
commit
b64d96f3de
@ -1095,10 +1095,11 @@ class calendar_boupdate extends calendar_bo
|
||||
// Add ACCEPT|REHECT|TENTATIVE actions
|
||||
$notification->set_popupdata('calendar', array(
|
||||
'event_id' => $event['id'],
|
||||
'user_id' => $userid
|
||||
'user_id' => $userid,
|
||||
'type' => $m_type
|
||||
));
|
||||
}
|
||||
if ($m_type === MSG_ALARM) $notification->set_popupdata('calendar', array('egw_pr_notify' => 1));
|
||||
if ($m_type === MSG_ALARM) $notification->set_popupdata('calendar', array('egw_pr_notify' => 1, 'type' => $m_type));
|
||||
$notification->set_popupmessage($subject."\n\n".$notify_body."\n\n".$details['description']."\n\n".$details_body."\n\n");
|
||||
$notification->set_popuplinks(array($details['link_arr']+array('app'=>'calendar')));
|
||||
|
||||
|
@ -895,6 +895,8 @@ END:VALARM';
|
||||
public static function notifications_actions ($params)
|
||||
{
|
||||
Api\Translation::add_app('calendar');
|
||||
// do not set actions for alarm type
|
||||
if ($params['data']['type'] == 6) return array();
|
||||
return array(
|
||||
array(
|
||||
'id' => 'A',
|
||||
|
@ -186,7 +186,7 @@ class notifications_ajax {
|
||||
foreach ($rs as $notification) {
|
||||
$actions = null;
|
||||
$data = json_decode($notification['notify_data'], true);
|
||||
if ($data['appname'])
|
||||
if ($data['appname'] && $data['data'])
|
||||
{
|
||||
$_actions = Api\Hooks::process (array(
|
||||
'location' => 'notifications_actions',
|
||||
|
Loading…
Reference in New Issue
Block a user