diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 30abc0a4e8..970834e6d9 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2011-06-06 Juan Manuel Ramon + + * include/functions_tags.php: Fixed problem on + update tag function. + * godmode/tag/tag.php + * godmode/tag/edit_tag.php: Added tab that links to + tag list view. + 2011-06-06 Juan Manuel Ramon * include/functions_modules.php: Some mofications over update_tag diff --git a/pandora_console/godmode/tag/edit_tag.php b/pandora_console/godmode/tag/edit_tag.php index 720ebf5fa6..45b099557e 100644 --- a/pandora_console/godmode/tag/edit_tag.php +++ b/pandora_console/godmode/tag/edit_tag.php @@ -32,9 +32,18 @@ $create_tag = (int) get_parameter ("create_tag", 0); $name_tag = (string) get_parameter ("name_tag", ""); $description_tag = (string) get_parameter ("description_tag", ""); $url_tag = (string) get_parameter ("url_tag", ""); +$tab = (string) get_parameter ("tab", "list"); + +$buttons = array( + 'list' => array( + 'active' => false, + 'text' => '' . + html_print_image ("images/god6.png", true, array ("title" => __('List tags'))) .'')); + +$buttons[$tab]['active'] = true; // Header -ui_print_page_header (__('Tags configuration'), "images/comments.png", false, "", true); +ui_print_page_header (__('Tags configuration'), "images/comments.png", false, "", true, $buttons); // Two actions can performed in this page: update and create tags // Update tag: update an existing tag diff --git a/pandora_console/godmode/tag/tag.php b/pandora_console/godmode/tag/tag.php index 115311cb3a..6423e00504 100644 --- a/pandora_console/godmode/tag/tag.php +++ b/pandora_console/godmode/tag/tag.php @@ -32,6 +32,7 @@ require_once ($config['homedir'].'/include/functions_tags.php'); $delete = (int) get_parameter ("delete_tag", 0); $search = (int) get_parameter ("search_tag", 0); $tag_name = (string) get_parameter ("tag_name",""); +$tab = (string) get_parameter ("tab", "list"); //Ajax tooltip to deploy module's count info of a tag. if (is_ajax ()) { @@ -55,8 +56,16 @@ if (is_ajax ()) { return; } +$buttons = array( + 'list' => array( + 'active' => false, + 'text' => '' . + html_print_image ("images/god6.png", true, array ("title" => __('List tags'))) .'')); + +$buttons[$tab]['active'] = true; + // Header -ui_print_page_header (__('Tags configuration'), "images/comments.png", false, "", true); +ui_print_page_header (__('Tags configuration'), "images/comments.png", false, "", true, $buttons); // Two actions can performed in this page: search and delete tags diff --git a/pandora_console/include/functions_tags.php b/pandora_console/include/functions_tags.php index 706c637049..024c0145e4 100644 --- a/pandora_console/include/functions_tags.php +++ b/pandora_console/include/functions_tags.php @@ -69,6 +69,8 @@ function tags_search_tag ($tag_name_description = false, $filter = false, $only_ else { $result = db_get_all_rows_sql ($sql); } + if ($result === false) + $result = array(); $result_tags = array(); if ($only_names) { foreach ($result as $tag){ @@ -287,7 +289,7 @@ function tags_update_module_tag ($id_agent_module, $tags, $autocommit = false){ $tags = array(); /* First delete module tag entries */ - $result_tag = db_process_sql_delete ('ttag_module', 'id_agente_modulo', $id_agent_module); + $result_tag = db_process_sql_delete ('ttag_module', array('id_agente_modulo' => $id_agent_module)); $values = array(); foreach ($tags as $tag){