2011-06-06 Juan Manuel Ramon <juanmanuel.ramon@artica.es>

* 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.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4407 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
juanmanuelr 2011-06-06 13:58:34 +00:00
parent 7e1795ca4a
commit 8a5132fa8b
4 changed files with 31 additions and 3 deletions

View File

@ -1,3 +1,11 @@
2011-06-06 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* 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 <juanmanuel.ramon@artica.es> 2011-06-06 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_modules.php: Some mofications over update_tag * include/functions_modules.php: Some mofications over update_tag

View File

@ -32,9 +32,18 @@ $create_tag = (int) get_parameter ("create_tag", 0);
$name_tag = (string) get_parameter ("name_tag", ""); $name_tag = (string) get_parameter ("name_tag", "");
$description_tag = (string) get_parameter ("description_tag", ""); $description_tag = (string) get_parameter ("description_tag", "");
$url_tag = (string) get_parameter ("url_tag", ""); $url_tag = (string) get_parameter ("url_tag", "");
$tab = (string) get_parameter ("tab", "list");
$buttons = array(
'list' => array(
'active' => false,
'text' => '<a href="index.php?sec=galertas&sec2=godmode/tag/tag&tab=list">' .
html_print_image ("images/god6.png", true, array ("title" => __('List tags'))) .'</a>'));
$buttons[$tab]['active'] = true;
// Header // 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 // Two actions can performed in this page: update and create tags
// Update tag: update an existing tag // Update tag: update an existing tag

View File

@ -32,6 +32,7 @@ require_once ($config['homedir'].'/include/functions_tags.php');
$delete = (int) get_parameter ("delete_tag", 0); $delete = (int) get_parameter ("delete_tag", 0);
$search = (int) get_parameter ("search_tag", 0); $search = (int) get_parameter ("search_tag", 0);
$tag_name = (string) get_parameter ("tag_name",""); $tag_name = (string) get_parameter ("tag_name","");
$tab = (string) get_parameter ("tab", "list");
//Ajax tooltip to deploy module's count info of a tag. //Ajax tooltip to deploy module's count info of a tag.
if (is_ajax ()) { if (is_ajax ()) {
@ -55,8 +56,16 @@ if (is_ajax ()) {
return; return;
} }
$buttons = array(
'list' => array(
'active' => false,
'text' => '<a href="index.php?sec=galertas&sec2=godmode/tag/tag&tab=list">' .
html_print_image ("images/god6.png", true, array ("title" => __('List tags'))) .'</a>'));
$buttons[$tab]['active'] = true;
// Header // 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 // Two actions can performed in this page: search and delete tags

View File

@ -69,6 +69,8 @@ function tags_search_tag ($tag_name_description = false, $filter = false, $only_
else { else {
$result = db_get_all_rows_sql ($sql); $result = db_get_all_rows_sql ($sql);
} }
if ($result === false)
$result = array();
$result_tags = array(); $result_tags = array();
if ($only_names) { if ($only_names) {
foreach ($result as $tag){ foreach ($result as $tag){
@ -287,7 +289,7 @@ function tags_update_module_tag ($id_agent_module, $tags, $autocommit = false){
$tags = array(); $tags = array();
/* First delete module tag entries */ /* 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(); $values = array();
foreach ($tags as $tag){ foreach ($tags as $tag){