2011-07-29 Dario Rodriguez <dario.rodriguez@artica.es>

* godmode/groups/group_list.php: Fixed a bug that allow
        to delete all agent groups and makes pandora unstable.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4654 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
darode 2011-07-29 13:56:02 +00:00
parent a46fc2e1c2
commit c5a34970b7
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2011-07-29 Dario Rodriguez <dario.rodriguez@artica.es>
* godmode/groups/group_list.php: Fixed a bug that allow
to delete all agent groups and makes pandora unstable.
2011-07-29 Dario Rodriguez <dario.rodriguez@artica.es>
* godmode/modules/manage_network_templates_form.php: Fixed

View File

@ -302,8 +302,12 @@ if(!empty($groups)) {
$data[4] = '';
}
else {
$data[4] = '<a href="index.php?sec=gagente&sec2=godmode/groups/configure_group&id_group='.$group['id_grupo'].'">' . html_print_image("images/config.png", true, array("alt" => __('Edit'), "title" => __('Edit'), "border" => '0'));
$data[4] .= '&nbsp;&nbsp;<a href="index.php?sec=gagente&sec2=godmode/groups/group_list&id_group='.$id_group.'&delete_group=1" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">' . html_print_image("images/cross.png", true, array("alt" => __('Delete'), "border" => '0'));
//Check if there is only a group to unable delete it
if ((count($groups) > 3) || (count($groups) <= 3 && $group['parent'] != 0)) {
$data[4] .= '&nbsp;&nbsp;<a href="index.php?sec=gagente&sec2=godmode/groups/group_list&id_group='.$id_group.'&delete_group=1" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">' . html_print_image("images/cross.png", true, array("alt" => __('Delete'), "border" => '0'));
}
}
array_push ($table->data, $data);