From f7d31365a07885010672874aa273acd86b853be4 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Fri, 8 Feb 2013 11:45:51 +0000 Subject: [PATCH] 2013-02-08 Sergio Martin * godmode/groups/configure_group.php: Fixed some bugs on the group icons in the groups form git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7615 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/godmode/groups/configure_group.php | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index eaaf49cd83..fbab336c96 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2013-02-08 Sergio Martin + + * godmode/groups/configure_group.php: Fixed some bugs on + the group icons in the groups form + 2013-02-08 Sergio Martin * godmode/servers/plugin.php: Prepare plugin manager to be used diff --git a/pandora_console/godmode/groups/configure_group.php b/pandora_console/godmode/groups/configure_group.php index 4e99781075..c76c56a4ac 100644 --- a/pandora_console/godmode/groups/configure_group.php +++ b/pandora_console/godmode/groups/configure_group.php @@ -47,7 +47,12 @@ if ($id_group) { $group = db_get_row ('tgrupo', 'id_grupo', $id_group); if ($group) { $name = $group["nombre"]; - $icon = $group["icon"].'.png'; + if(empty($group["icon"])) { + $icon = false; + } + else { + $icon = $group["icon"].'.png'; + } $alerts_disabled = $group["disabled"]; $id_parent = $group["parent"]; $custom_id = $group["custom_id"]; @@ -106,6 +111,7 @@ $table->data[1][1] .= ' '; if ($icon) { $table->data[1][1] .= html_print_image("images/groups_small/".$icon, true); } + $table->data[1][1] .= ''; $table->data[2][0] = __('Parent'); @@ -203,6 +209,9 @@ function parent_changed () { $('#parent_preview').fadeOut ('normal', function () { $('#parent_preview').empty (); if (data_ != null) { + if(data['icon'] == '') { + data['icon'] = 'without_group'; + } var params = []; params.push("get_image_path=1"); params.push("img_src=images/groups_small/" + data['icon'] + ".png");