[Vtigercrm-commits] [vtiger-commits] r10242 - /vtigercrm/branches/5.0.3/modules/Emails/Save.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Mon Feb 26 10:05:06 EST 2007


Author: saraj
Date: Mon Feb 26 08:05:01 2007
New Revision: 10242

Log:
When an Email is Saved the from email Id is set as the currentuser's emailid 

Modified:
    vtigercrm/branches/5.0.3/modules/Emails/Save.php

Modified: vtigercrm/branches/5.0.3/modules/Emails/Save.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Emails/Save.php (original)
+++ vtigercrm/branches/5.0.3/modules/Emails/Save.php Mon Feb 26 08:05:01 2007
@@ -165,6 +165,9 @@
 $focus->save("Emails");
 
 //saving the email details in vtiger_emaildetails vtiger_table
+$qry = 'select email1 from vtiger_users where id = '.$current_user->id;
+$res = $adb->query($qry);
+$user_email = $adb->query_result($res,0,"email1");
 $return_id = $focus->id;
 $email_id = $return_id;
 $query = 'select emailid from vtiger_emaildetails where emailid ='.$email_id;
@@ -181,7 +184,7 @@
 	$query = 'update vtiger_emaildetails set to_email="'.$all_to_ids.'",cc_email="'.$all_cc_ids.'",bcc_email="'.$all_bcc_ids.'",idlists="'.$_REQUEST["parent_id"].'",email_flag="SAVED" where emailid = '.$email_id;
 }else
 {
-	$query = 'insert into vtiger_emaildetails values ('.$email_id.',"","'.$all_to_ids.'","'.$all_cc_ids.'","'.$all_bcc_ids.'","","'.$_REQUEST["parent_id"].'","SAVED")';
+	$query = 'insert into vtiger_emaildetails values ('.$email_id.',"'.$user_email.'","'.$all_to_ids.'","'.$all_cc_ids.'","'.$all_bcc_ids.'","","'.$_REQUEST["parent_id"].'","SAVED")';
 }
 $adb->query($query);
 





More information about the vtigercrm-commits mailing list