[Vtigercrm-commits] [vtiger-commits] r10562 - /vtigercrm/branches/5.0.3/modules/Calendar/CalendarCommon.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Apr 4 11:52:06 EDT 2007
Author: saraj
Date: Wed Apr 4 09:52:01 2007
New Revision: 10562
Log:
notification mail for group is incorrect -fixed. Fixes #3437
Modified:
vtigercrm/branches/5.0.3/modules/Calendar/CalendarCommon.php
Modified: vtigercrm/branches/5.0.3/modules/Calendar/CalendarCommon.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Calendar/CalendarCommon.php (original)
+++ vtigercrm/branches/5.0.3/modules/Calendar/CalendarCommon.php Wed Apr 4 09:52:01 2007
@@ -296,9 +296,10 @@
/**
* Function to get the vtiger_activity details for mail body
* @param string $description - activity description
+ * @param string $from - to differenciate from notification to invitation.
* return string $list - HTML in string format
*/
-function getActivityDetails($description,$inviteeid='')
+function getActivityDetails($description,$user_id,$from='')
{
global $log,$current_user;
global $adb,$mod_strings;
@@ -311,18 +312,15 @@
}
else
{
- $end_date_lable=$mod_strings['End date'];
- }
- if($inviteeid=='')
- {
- $name = getUserName($description['user_id']);
+ $end_date_lable=$mod_strings['Due Date'];
+ }
+
+ $name = getUserName($user_id);
+
+ if($from == "invite")
+ $msg = $mod_strings['LBL_ACTIVITY_INVITATION'];
+ else
$msg = $mod_strings['LBL_ACTIVITY_NOTIFICATION'];
- }
- else
- {
- $name = getUserName($inviteeid);
- $msg = $mod_strings['LBL_ACTIVITY_INVITATION'];
- }
$current_username = getUserName($current_user->id);
$status = $description['status'];
@@ -387,7 +385,7 @@
if($desc['assingn_type'] == "U")
{
$to_email = getUserEmailId('id',$mail_id);
- $description = getActivityDetails($desc);
+ $description = getActivityDetails($desc,$current_user->id);
send_mail('Calendar',$to_email,$current_user->user_name,'',$subject,$description);
}
if($desc['assingn_type'] == "T")
@@ -424,7 +422,7 @@
{
if($inviteeid != '')
{
- $description=getActivityDetails($desc,$inviteeid);
+ $description=getActivityDetails($desc,$inviteeid,"invite");
$to_email = getUserEmailId('id',$inviteeid);
send_mail('Calendar',$to_email,$current_user->user_name,'',$subject,$description);
}
@@ -493,7 +491,8 @@
$mail_data['group_name'] = $grp_name;
$value = getaddEventPopupTime($st_time,$end_time,'24');
$start_hour = $value['starthour'].':'.$value['startmin'].''.$value['startfmt'];
- $end_hour = $value['endhour'] .':'.$value['endmin'].''.$value['endfmt'];
+ if($activity_type != 'Task' )
+ $end_hour = $value['endhour'] .':'.$value['endmin'].''.$value['endfmt'];
$mail_data['st_date_time']=getDisplayDate($st_date)." ".$start_hour;
$mail_data['end_date_time']=getDisplayDate($end_date)." ".$end_hour;
$mail_data['location']=$location;
More information about the vtigercrm-commits
mailing list