[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.33
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.33.2.8,1.71.2.33.2.9 |
Date: |
Sat, 31 May 2003 05:29:26 -0400 |
Update of /cvsroot/phpgroupware/calendar/inc
In directory subversions:/tmp/cvs-serv9305
Modified Files:
Tag: Version-0_9_16-branch
class.bocalendar.inc.php
Log Message:
removed some not longer needed stuff from send_update and added an
error-message if the sending of the mail fails (like in .14)
Index: class.bocalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.bocalendar.inc.php,v
retrieving revision 1.71.2.33.2.8
retrieving revision 1.71.2.33.2.9
diff -C2 -r1.71.2.33.2.8 -r1.71.2.33.2.9
*** class.bocalendar.inc.php 29 May 2003 10:36:37 -0000 1.71.2.33.2.8
--- class.bocalendar.inc.php 31 May 2003 09:29:24 -0000 1.71.2.33.2.9
***************
*** 2212,2246 ****
{
case MSG_DELETED:
! $action = $msg = 'Canceled';
$msgtype = '"calendar";';
break;
case MSG_MODIFIED:
! $action = $msg = 'Modified';
$msgtype = '"calendar";
Version="'.$version.'"; Id="'.$new_event['id'].'"';
break;
case MSG_ADDED:
! $action = $msg = 'Added';
$msgtype = '"calendar";
Version="'.$version.'"; Id="'.$new_event['id'].'"';
break;
case MSG_REJECTED:
! $action = 'Rejected';
$msg = 'Response';
$msgtype = '"calendar";';
break;
case MSG_TENTATIVE:
! $action = 'Tentative';
$msg = 'Response';
$msgtype = '"calendar";';
break;
case MSG_ACCEPTED:
! $action = 'Accepted';
$msg = 'Response';
$msgtype = '"calendar";';
break;
}
$notify_msg = $this->prefs['calendar']['notify'.$msg];
$details = array( //
event-details for the notify-msg
'id' => $msg_type == MSG_ADDED ?
$new_event['id'] : $old_event['id'],
! 'action' => lang($action),
);
$event_arr = $this->event2array($event);
--- 2212,2257 ----
{
case MSG_DELETED:
! $action = lang('Canceled');
! $msg = 'Canceled';
$msgtype = '"calendar";';
+ $method = 'cancel';
break;
case MSG_MODIFIED:
! $action = lang('Modified');
! $msg = 'Modified';
$msgtype = '"calendar";
Version="'.$version.'"; Id="'.$new_event['id'].'"';
+ $method = 'request';
break;
case MSG_ADDED:
! $action = lang('Added');
! $msg = 'Added';
$msgtype = '"calendar";
Version="'.$version.'"; Id="'.$new_event['id'].'"';
+ $method = 'request';
break;
case MSG_REJECTED:
! $action = lang('Rejected');
$msg = 'Response';
$msgtype = '"calendar";';
+ $method = 'reply';
break;
case MSG_TENTATIVE:
! $action = lang('Tentative');
$msg = 'Response';
$msgtype = '"calendar";';
+ $method = 'reply';
break;
case MSG_ACCEPTED:
! $action = lang('Accepted');
$msg = 'Response';
$msgtype = '"calendar";';
+ $method = 'reply';
break;
+ default:
+ $method = 'publish';
}
$notify_msg = $this->prefs['calendar']['notify'.$msg];
$details = array( //
event-details for the notify-msg
'id' => $msg_type == MSG_ADDED ?
$new_event['id'] : $old_event['id'],
! 'action' => $action,
);
$event_arr = $this->event2array($event);
***************
*** 2279,2282 ****
--- 2290,2298 ----
$to = $part_prefs['email']['address'];
+ if (empty($to)) // we have no valid
email-address
+ {
+ echo
"<p>bocalendar::send_update: Empty email adress for user
'".$details['to-fullname']."' ==> ignored !!!</p>\n";
+ continue;
+ }
print_debug('Email being sent to',$to);
***************
*** 2294,2326 ****
$details['enddate'] =
$GLOBALS['phpgw']->common->show_date($endtime);
- switch($msg_type)
- {
- case MSG_DELETED:
- $action_date =
$old_event_date;
- $body = lang ('Your
meeting scheduled for') .' '. $old_event_date .' '. lang('has been canceled');
- $method = 'cancel';
- break;
- case MSG_MODIFIED:
- $action_date =
$new_event_date;
- $body = lang ('Your
meeting that had been scheduled for').' '.$old_event_date.' '. lang('has been
rescheduled to') .' '.$new_event_date;
- $method = 'request';
- break;
- case MSG_ADDED:
- $action_date =
$new_event_date;
- $body = lang ('You have
a meeting scheduled for').' '. $new_event_date;
- $method = 'request';
- break;
- case MSG_REJECTED:
- case MSG_TENTATIVE:
- case MSG_ACCEPTED:
- $action_date =
$old_event_date;
- $body = 'On
'.$GLOBALS['phpgw']->common->show_date(time() -
$GLOBALS['phpgw']->datetime->tz_offset).'
'.$GLOBALS['phpgw']->common->grab_owner_name($GLOBALS['phpgw_info']['user']['account_id']).'
'.$action.' your meeting request for '.$old_event_date;
- $body = lang('On %1 %2
%3 your meeting request for %4',$GLOBALS['phpgw']->common->show_date(time() -
$GLOBALS['phpgw']->datetime->tz_offset),$GLOBALS['phpgw']->common->grab_owner_name($GLOBALS['phpgw_info']['user']['account_id']),lang($action),$old_event_date);
- $method = 'reply';
- break;
- default:
- $method = 'publish';
- }
- $subject = lang('Calendar Event') . '
('. lang($action) .') #'.$event_id.': '.$action_date.' (L)';
list($subject,$body) =
split("\n",$GLOBALS['phpgw']->preferences->parse_notify($notify_msg,$details),2);
$subject =
$send->encode_subject($subject);
--- 2310,2313 ----
***************
*** 2358,2361 ****
--- 2345,2354 ----
$returncode =
$send->msg('email',$to,$subject,$body,''/*$msgtype*/,'','','',$sender,
$content_type/*,$boundary*/);
//echo "<p>send(to='$to',
sender='$sender'<br>subject='$subject')
returncode=$returncode<br>".nl2br($body)."</p>\n";
+
+ if (!$returncode) // not nice,
but better than failing silently
+ {
+ echo
"<p>bocalendar::send_update: sending message to '$to' #$userid
subject='$subject', sender='$sender' failed !!!<br>\n";
+ echo
$send->err['desc']."</p>\n";
+ }
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.33.2.8,1.71.2.33.2.9,
Ralf Becker <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: news_admin/setup setup.inc.php,1.5,1.5.4.1 tables_current.inc.php,1.3,1.3.4.1tables_update.inc.php,1.1,1.1.4.1
- Next by Date:
[Phpgroupware-cvs] CVS: sitemgr/setup tables_update.inc.php,1.13,1.14
- Previous by thread:
[Phpgroupware-cvs] CVS: news_admin/setup setup.inc.php,1.5,1.5.4.1 tables_current.inc.php,1.3,1.3.4.1tables_update.inc.php,1.1,1.1.4.1
- Next by thread:
[Phpgroupware-cvs] CVS: sitemgr/setup tables_update.inc.php,1.13,1.14
- Index(es):