[Vtigercrm-commits] [vtiger-commits] r9238 - /vtigercrm/trunk/modules/Settings/AddCustomFieldToDB.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Sun Sep 3 23:56:38 EDT 2006
Author: saraj
Date: Sun Sep 3 21:56:34 2006
New Revision: 9238
Log:
changes done to make multiselect combo box/picklist values editable --Minnie
Modified:
vtigercrm/trunk/modules/Settings/AddCustomFieldToDB.php
Modified: vtigercrm/trunk/modules/Settings/AddCustomFieldToDB.php
==============================================================================
--- vtigercrm/trunk/modules/Settings/AddCustomFieldToDB.php (original)
+++ vtigercrm/trunk/modules/Settings/AddCustomFieldToDB.php Sun Sep 3 21:56:34 2006
@@ -286,15 +286,24 @@
if($fldType == 'Picklist' || $fldType == 'MultiSelectCombo')
{
// Creating the PickList Table and Populating Values
- $qur = "CREATE TABLE vtiger_".$columnName." (
+ if($_REQUEST['fieldid'] == '')
+ {
+ $qur = "CREATE TABLE vtiger_".$columnName." (
".$columnName."id int(19) NOT NULL auto_increment,
".$columnName." varchar(200) NOT NULL,
sortorderid int(19) NOT NULL default '0',
presence int(1) NOT NULL default '1',
PRIMARY KEY (".$columnName."id)
)";
- $adb->query($qur);
-
+ $adb->query($qur);
+ }
+
+ if($_REQUEST['fieldid'] != '' && $mode == 'edit')
+ {
+ $delquery = "DELETE from vtiger_".$columnName;
+ $adb->query($delquery);
+ }
+ $pickArray = Array();
$fldPickList = $_REQUEST['fldPickList'];
$pickArray = explode("\n",$fldPickList);
$count = count($pickArray);
@@ -309,7 +318,7 @@
}
}
}
- //Inserting into LeadMapping vtiger_table - Jaguar
+ //Inserting into LeadMapping table - Jaguar
if($fldmodule == 'Leads' && $_REQUEST['fieldid'] == '')
{
More information about the vtigercrm-commits
mailing list