[Vtigercrm-commits] [vtiger-commits] r10586 - in /vtigercrm/branches/5.0.3/modules/Calendar: ActivityAjax.php CalendarCommon.php Save.php TodoSave.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Fri Apr 6 10:21:57 EDT 2007


Author: richie
Date: Fri Apr  6 08:21:47 2007
New Revision: 10586

Log:
changes made for group notification. --minnie

Modified:
    vtigercrm/branches/5.0.3/modules/Calendar/ActivityAjax.php
    vtigercrm/branches/5.0.3/modules/Calendar/CalendarCommon.php
    vtigercrm/branches/5.0.3/modules/Calendar/Save.php
    vtigercrm/branches/5.0.3/modules/Calendar/TodoSave.php

Modified: vtigercrm/branches/5.0.3/modules/Calendar/ActivityAjax.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Calendar/ActivityAjax.php (original)
+++ vtigercrm/branches/5.0.3/modules/Calendar/ActivityAjax.php Fri Apr  6 08:21:47 2007
@@ -145,7 +145,7 @@
 				$mail_data = getActivityMailInfo($return_id,$status,$activity_type);
 				if($mail_data['sendnotification'] == 1)
 				{
-					getEventNotification($mail_data['user_id'],$activity_type,$mail_data['subject'],$mail_data);
+					getEventNotification($activity_type,$mail_data['subject'],$mail_data);
 				}
 				$invitee_qry = "select * from vtiger_invitees where activityid=".$return_id;
 				$invitee_res = $adb->query($invitee_qry);

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 Fri Apr  6 08:21:47 2007
@@ -375,17 +375,16 @@
 	return $timeStr;
 }
 //added to fix Ticket#3068
-function getEventNotification($mail_id,$mode,$subject,$desc)
+function getEventNotification($mode,$subject,$desc)
 {
 	global $current_user,$adb;
 	require_once("modules/Emails/mail.php");
 	$subject = $mode.' : '.$subject;
 	$crmentity = new CRMEntity();
-
 	if($desc['assingn_type'] == "U")
 	{
-		$to_email = getUserEmailId('id',$mail_id);
-		$description = getActivityDetails($desc,$current_user->id);
+		$to_email = getUserEmailId('id',$desc['user_id']);
+		$description = getActivityDetails($desc,$desc['user_id']);
 		send_mail('Calendar',$to_email,$current_user->user_name,'',$subject,$description);
 	}
 	if($desc['assingn_type'] == "T")
@@ -449,12 +448,12 @@
 	$res = $adb->query($usr_qry);
 	$usr_id = $adb->query_result($res,0,"smownerid");
 	$assignType = "U";
-	if($usr_id == '')
+	if($usr_id == 0)
 	{
 		$assignType = "T";
 		$group_qry = "select groupname from vtiger_activitygrouprelation where activityid=".$return_id;
 		$grp_res = $adb->query($group_qry);
-		$grp_name = $adb->query_result($res,0,"groupname");
+		$grp_name = $adb->query_result($grp_res,0,"groupname");
 	}
 
 

Modified: vtigercrm/branches/5.0.3/modules/Calendar/Save.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Calendar/Save.php (original)
+++ vtigercrm/branches/5.0.3/modules/Calendar/Save.php Fri Apr  6 08:21:47 2007
@@ -61,7 +61,7 @@
 	$mail_data = getActivityMailInfo($return_id,$status,$activity_type);
 	if($mail_data['sendnotification'] == 1)
 	{
-		getEventNotification($mail_data['user_id'],$activity_type,$mail_data['subject'],$mail_data);
+		getEventNotification($activity_type,$mail_data['subject'],$mail_data);
 	}
 	$invitee_qry = "select * from vtiger_invitees where activityid=".$return_id;
 	$invitee_res = $adb->query($invitee_qry);
@@ -186,7 +186,7 @@
 if($_REQUEST['sendnotification'] == 'on')
 {
 	$mail_contents = getRequestData();
-	getEventNotification($_REQUEST['assigned_user_id'],$_REQUEST['activity_mode'],$_REQUEST['subject'],$mail_contents);
+	getEventNotification($_REQUEST['activity_mode'],$_REQUEST['subject'],$mail_contents);
 }
 
 //code added to send mail to the vtiger_invitees

Modified: vtigercrm/branches/5.0.3/modules/Calendar/TodoSave.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Calendar/TodoSave.php (original)
+++ vtigercrm/branches/5.0.3/modules/Calendar/TodoSave.php Fri Apr  6 08:21:47 2007
@@ -50,7 +50,7 @@
 	if($_REQUEST["task_sendnotification"]=='on')
         {
 		$mail_contents = getRequestedToData();
-		getEventNotification($_REQUEST['task_assigned_user_id'],$_REQUEST['activity_mode'],$_REQUEST['task_subject'],$mail_contents);
+		getEventNotification($_REQUEST['activity_mode'],$_REQUEST['task_subject'],$mail_contents);
 
         }
 function getRequestedToData()





More information about the vtigercrm-commits mailing list