[Vtigercrm-commits] [vtiger-commits] r4441 - /vtigercrm/branches/4.2_postgresql_integration/modules/Users/UserInfoUtil.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon Mar 27 02:48:17 EST 2006
Author: allanbush
Date: Mon Mar 27 00:48:13 2006
New Revision: 4441
Log:
Fixed lead update problems by checking that groupname is given before trying to update database with a potential null value. Ref #17.
Modified:
vtigercrm/branches/4.2_postgresql_integration/modules/Users/UserInfoUtil.php
Modified: vtigercrm/branches/4.2_postgresql_integration/modules/Users/UserInfoUtil.php
==============================================================================
--- vtigercrm/branches/4.2_postgresql_integration/modules/Users/UserInfoUtil.php (original)
+++ vtigercrm/branches/4.2_postgresql_integration/modules/Users/UserInfoUtil.php Mon Mar 27 00:48:13 2006
@@ -425,6 +425,7 @@
global $adb;
$sqldelete = "delete from users2group where userid = '" .$userid ."'";
$result_delete = $adb->query($sqldelete);
+ if($groupname == '') return;
$sql = "insert into users2group(groupname,userid) values('" .$groupname ."','" .$userid ."')";
$result = $adb->query($sql);
}
@@ -442,6 +443,7 @@
function insertUsers2GroupMapping($groupname,$userid)
{
global $adb;
+ if($groupname == '') return;
$sql = "insert into users2group(groupname,userid) values('" .$groupname ."','" .$userid ."')";
$adb->query($sql);
}
@@ -527,6 +529,7 @@
function insert2LeadGroupRelation($leadid,$groupname)
{
global $adb;
+ if($groupname == '') return;
$sql = "insert into leadgrouprelation values (" .$leadid .",'".$groupname."')";
$adb->query($sql);
@@ -536,6 +539,7 @@
global $adb;
$sqldelete = "delete from leadgrouprelation where leadid=".$leadid;
$adb->query($sqldelete);
+ if($groupname == '') return;
$sql = "insert into leadgrouprelation values (".$leadid .",'" .$groupname ."')";
$adb->query($sql);
@@ -545,6 +549,7 @@
global $adb;
$sqldelete = "delete from ticketgrouprelation where ticketid=".$ticketid;
$adb->query($sqldelete);
+ if($groupname == '') return;
$sql = "insert into ticketgrouprelation values (".$ticketid .",'" .$groupname ."')";
$adb->query($sql);
@@ -553,6 +558,7 @@
function insert2ActivityGroupRelation($activityid,$groupname)
{
global $adb;
+ if($groupname == '') return;
$sql = "insert into activitygrouprelation values (" .$activityid .",'".$groupname."')";
$adb->query($sql);
@@ -561,6 +567,7 @@
function insert2TicketGroupRelation($ticketid,$groupname)
{
global $adb;
+ if($groupname == '') return;
$sql = "insert into ticketgrouprelation values (" .$ticketid .",'".$groupname."')";
$adb->query($sql);
More information about the vtigercrm-commits
mailing list