[Vtigercrm-commits] [vtiger-commits] r7689 - in /vtigercrm/trunk/modules: Contacts/Save.php Leads/Save.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Fri Jun 30 03:06:07 EDT 2006
Author: saraj
Date: Fri Jun 30 01:06:03 2006
New Revision: 7689
Log:
changes made to save the reltion between campaign and contact
Modified:
vtigercrm/trunk/modules/Contacts/Save.php
vtigercrm/trunk/modules/Leads/Save.php
Modified: vtigercrm/trunk/modules/Contacts/Save.php
==============================================================================
--- vtigercrm/trunk/modules/Contacts/Save.php (original)
+++ vtigercrm/trunk/modules/Contacts/Save.php Fri Jun 30 01:06:03 2006
@@ -50,7 +50,7 @@
$local_log =& LoggerManager::getLogger('index');
-global $log;
+global $log,$adb;
$focus = new Contact();
setObjectValuesFromRequest(&$focus);
Modified: vtigercrm/trunk/modules/Leads/Save.php
==============================================================================
--- vtigercrm/trunk/modules/Leads/Save.php (original)
+++ vtigercrm/trunk/modules/Leads/Save.php Fri Jun 30 01:06:03 2006
@@ -19,7 +19,7 @@
require_once('include/utils/UserInfoUtil.php');
$local_log =& LoggerManager::getLogger('index');
-global $log;
+global $log,$adb;
$focus = new Lead();
global $current_user;
$currencyid=fetchCurrency($current_user->id);
@@ -68,6 +68,17 @@
//code added for returning back to the current view after edit from list view
if($_REQUEST['return_viewname'] == '') $return_viewname='0';
if($_REQUEST['return_viewname'] != '')$return_viewname=$_REQUEST['return_viewname'];
+
+if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] == "Campaigns")
+{
+ if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "")
+ {
+ $sql = "insert into vtiger_campaignleadrel values (".$_REQUEST['return_id'].",".$focus->id.")";
+ $adb->query($sql);
+ }
+}
+
+
header("Location: index.php?action=$return_action&module=$return_module&record=$return_id&viewname=$return_viewname");
//Code to save the custom vtiger_field info into database
More information about the vtigercrm-commits
mailing list