[Vtigercrm-commits] [vtiger-commits] r10162 - /vtigercrm/branches/5.0.3/include/utils/CommonUtils.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Fri Feb 9 09:12:43 EST 2007
Author: saraj
Date: Fri Feb 9 07:12:40 2007
New Revision: 10162
Log:
fix-group related issue --Minnie
Modified:
vtigercrm/branches/5.0.3/include/utils/CommonUtils.php
Modified: vtigercrm/branches/5.0.3/include/utils/CommonUtils.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/utils/CommonUtils.php (original)
+++ vtigercrm/branches/5.0.3/include/utils/CommonUtils.php Fri Feb 9 07:12:40 2007
@@ -2116,29 +2116,31 @@
{
$result = get_group_options();
}
+
$groupArray = $adb->fetch_array($result);
-
- do{
- $groupname=$groupArray["groupname"];
- $group_id=$groupArray["groupid"];
- $selected = '';
- if($groupname == $selected_groupname[0])
- {
- $selected = "selected";
- }
- if($groupname != '')
- $group_option[$group_id] = array($groupname=>$selected);
- }while($groupArray = $adb->fetch_array($result));
-
- foreach($group_option as $groupid=>$value)
- {
- foreach($value as $groupname=>$selected)
- {
- $change_groups_owner .= "<option value=$groupid $selected >".$groupname."</option>";
- }
- }
- $log->debug("Exiting getGroupslist method ...");
- return $change_groups_owner;
+ if(!empty($groupArray)){
+ do{
+ $groupname=$groupArray["groupname"];
+ $group_id=$groupArray["groupid"];
+ $selected = '';
+ if($groupname == $selected_groupname[0])
+ {
+ $selected = "selected";
+ }
+ if($groupname != '')
+ $group_option[$group_id] = array($groupname=>$selected);
+ }while($groupArray = $adb->fetch_array($result));
+
+ foreach($group_option as $groupid=>$value)
+ {
+ foreach($value as $groupname=>$selected)
+ {
+ $change_groups_owner .= "<option value=$groupid $selected >".$groupname."</option>";
+ }
+ }
+ $log->debug("Exiting getGroupslist method ...");
+ return $change_groups_owner;
+ }
}
More information about the vtigercrm-commits
mailing list