[Vtigercrm-commits] [vtiger-commits] r6112 - /vtigercrm/trunk/modules/Users/SaveRole.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed May 17 06:44:55 EDT 2006
Author: don
Date: Wed May 17 04:44:52 2006
New Revision: 6112
Log:
fixed issue in role duplication check
Modified:
vtigercrm/trunk/modules/Users/SaveRole.php
Modified: vtigercrm/trunk/modules/Users/SaveRole.php
==============================================================================
--- vtigercrm/trunk/modules/Users/SaveRole.php (original)
+++ vtigercrm/trunk/modules/Users/SaveRole.php Wed May 17 04:44:52 2006
@@ -12,9 +12,19 @@
require_once('include/database/PearDatabase.php');
global $adb;
$rolename = $_REQUEST['roleName'];
+$mode = $_REQUEST['mode'];
if(isset($_REQUEST['dup_check']) && $_REQUEST['dup_check']!='')
{
- $query = 'select rolename from role where rolename="'.$rolename.'"';
+ if($mode != 'edit')
+ {
+ $query = 'select rolename from role where rolename="'.$rolename.'"';
+ }
+ else
+ {
+ $roleid=$_REQUEST['roleid'];
+ $query = 'select rolename from role where rolename="'.$rolename.'" and roleid !="'.$roleid.'"';
+
+ }
$result = $adb->query($query);
if($adb->num_rows($result) > 0)
{
@@ -25,6 +35,7 @@
echo 'SUCESS';
die;
}
+
}
$parentRoleId=$_REQUEST['parent'];
//Inserting values into Role Table
More information about the vtigercrm-commits
mailing list