[Vtigercrm-commits] [vtiger-commits] r4566 - in /vtigercrm/trunk/modules/Leads: ConvertLead.php Lead.js Lead.php LeadConvertToEntities.php Save.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue Mar 28 02:30:04 EST 2006
Author: saraj
Date: Tue Mar 28 00:29:55 2006
New Revision: 4566
Log:
Unwanted Codes removed
Modified:
vtigercrm/trunk/modules/Leads/ConvertLead.php
vtigercrm/trunk/modules/Leads/Lead.js
vtigercrm/trunk/modules/Leads/Lead.php
vtigercrm/trunk/modules/Leads/LeadConvertToEntities.php
vtigercrm/trunk/modules/Leads/Save.php
Modified: vtigercrm/trunk/modules/Leads/ConvertLead.php
==============================================================================
--- vtigercrm/trunk/modules/Leads/ConvertLead.php (original)
+++ vtigercrm/trunk/modules/Leads/ConvertLead.php Tue Mar 28 00:29:55 2006
@@ -29,10 +29,6 @@
$log->debug(" the userid is ".$userid);
$crmid = $adb->getUniqueID("crmentity");
-//$sql_crmentity = "insert into crmentity(crmid,smcreatorid,smownerid,setype,presence,deleted) values(".$id.",".$userid.",".$userid.",account,0,0)";
-
-//$adb->query($sql_crmentity);
-
$sql = "SELECT firstname, lastname, company, smownerid from leaddetails inner join crmentity on crmentity.crmid=leaddetails.leadid where leaddetails.leadid =".$id;
$result = $adb->query($sql);
Modified: vtigercrm/trunk/modules/Leads/Lead.js
==============================================================================
--- vtigercrm/trunk/modules/Leads/Lead.js (original)
+++ vtigercrm/trunk/modules/Leads/Lead.js Tue Mar 28 00:29:55 2006
@@ -324,8 +324,6 @@
var fldId = getOpenerObj("lead_id");
fldName.value = product_name;
fldId.value = product_id;
- //window.opener.document.EditView.lead_name.value = product_name;
- //window.opener.document.EditView.lead_id.value = product_id;
}
function add_data_to_relatedlist(entity_id,recordid) {
Modified: vtigercrm/trunk/modules/Leads/Lead.php
==============================================================================
--- vtigercrm/trunk/modules/Leads/Lead.php (original)
+++ vtigercrm/trunk/modules/Leads/Lead.php Tue Mar 28 00:29:55 2006
@@ -186,8 +186,6 @@
//check if the custom table exists or not in the first place
function checkIfCustomTableExists()
{
- //$result = mysql_query("select * from accountcf");
- //$testrow = mysql_num_fields($result);
$result = $this->db->query("select * from leadscf");
$testrow = $this->db->num_fields($result);
if($testrow > 1)
Modified: vtigercrm/trunk/modules/Leads/LeadConvertToEntities.php
==============================================================================
--- vtigercrm/trunk/modules/Leads/LeadConvertToEntities.php (original)
+++ vtigercrm/trunk/modules/Leads/LeadConvertToEntities.php Tue Mar 28 00:29:55 2006
@@ -217,8 +217,6 @@
}
-
-//$sql_crmentity = "insert into crmentity(crmid,smcreatorid,smownerid,setype,presence,createdtime,modifiedtime,deleted) values(".$crmid.",".$current_user_id.",".$current_user_id.",'Accounts',1,".$date_entered.",".$date_modified.",0)";
$sql_crmentity = "insert into crmentity(crmid,smcreatorid,smownerid,setype,presence,createdtime,modifiedtime,deleted,description) values(".$crmid.",".$current_user_id.",".$assigned_user_id.",'Accounts',1,".$date_entered.",".$date_modified.",0,'".$row['description']."')";
$adb->query($sql_crmentity);
Modified: vtigercrm/trunk/modules/Leads/Save.php
==============================================================================
--- vtigercrm/trunk/modules/Leads/Save.php (original)
+++ vtigercrm/trunk/modules/Leads/Save.php Tue Mar 28 00:29:55 2006
@@ -39,41 +39,10 @@
foreach($focus->column_fields as $fieldname => $val)
{
- /*
- $tempvalue;
- if($field == 'assigned_user_id')
- {
- //check which radio button the user has chosen
- if($_REQUEST['assigntype'] == 'T')
- {
- $value='null';
- $focus->$field = $value;
- }
- else
- {
- $tempvalue = $_REQUEST['assigned_user_id'];
- $value = $tempvalue;
- $focus->$field = $value;
- }
- }
- else if(isset($_REQUEST[$field]))
- {
- $value=$_REQUEST[$field];
- $focus->$field = $value;
- }
-
- if(get_magic_quotes_gpc() == 1)
- {
- $focus->$field = stripslashes($focus->$field);
- }
- */
- if(isset($_REQUEST[$fieldname]))
+ if(isset($_REQUEST[$fieldname]))
{
$value = $_REQUEST[$fieldname];
$log->info("the value is ".$value);
- //echo '<BR>';
- //echo $fieldname." ".$value;
- //echo '<BR>';
$focus->column_fields[$fieldname] = $value;
}
if(isset($_REQUEST['annualrevenue']))
@@ -84,73 +53,10 @@
}
-/*
-foreach($focus->additional_column_fields as $field)
-{
- if(isset($_REQUEST[$field]))
- {
- if($field == 'assigned_user_id')
- {
- //check which radio button the user has chosen
- if($_REQUEST['assigntype'] == 'T')
- {
- $value = 'null';
- }
- else
- {
- $value = $_REQUEST['assigned_user_id'];
- }
- }
-
- else
- {
- $value = $_REQUEST[$field];
- }
- $focus->$field = $value;
- if(get_magic_quotes_gpc() == 1)
- {
- $focus->$field = stripslashes($focus->$field);
- }
- }
-}
-$createLeadFlag = true;
-if($focus->id == "")
-{
-}
-else
-{
-$createLeadFlag = false;
-if($_REQUEST['assigntype'] == 'T')
- {
- $tempvalue = $_REQUEST['assigned_group_name'];
- $value=$tempvalue;
- updateLeadGroupRelation($focus->id,$value);
- }
-else
-{
-updateLeadGroupRelation($focus->id,'');
-}
-
-
-}
-*/
-//$focus->saveentity("Leads");
$focus->save("Leads");
$return_id = $focus->id;
$log->info("the return id is ".$return_id);
-/*
-if($createLeadFlag)
-{
- if($_REQUEST['assigntype'] == 'T')
- {
- $tempvalue = $_REQUEST['assigned_group_name'];
- $value=$tempvalue;
- insert2LeadGroupRelation($focus->id,$value);
- }
-}
-save_customfields($focus->id);
-*/
if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != "") $return_module = $_REQUEST['return_module'];
else $return_module = "Leads";
if(isset($_REQUEST['return_action']) && $_REQUEST['return_action'] != "") $return_action = $_REQUEST['return_action'];
@@ -239,19 +145,5 @@
}
}
- /* srini patch
- else
- {
- if(isset($_REQUEST['record']) && $_REQUEST['record'] != '' && $adb->num_rows($cust_result) !=0)
- {
- //Update Block
- }
- else
- {
- //Insert Block
- $query = 'insert into leadcf ('.$columns.') values('.$values.')';
- $adb->query($query);
- }
- }*/
}
?>
More information about the vtigercrm-commits
mailing list