From: moodler Date: Mon, 3 Sep 2007 08:24:18 +0000 (+0000) Subject: Fixed deletion of tags X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f458e359ab3daccc105f9907337dc2cd1fcf310b;p=moodle.git Fixed deletion of tags --- diff --git a/tag/lib.php b/tag/lib.php index a2b33c9d3c..03a94ebc63 100644 --- a/tag/lib.php +++ b/tag/lib.php @@ -86,7 +86,10 @@ function tag_delete($tag_names_or_ids_csv) { // Luiz: (in near future) tag instances should be cascade deleted by RDMS referential integrity constraints, when moodle implements it // For now, tag_instance orphans should be removed using tag_instance_table_cleanup() - return delete_records_select('tag',"name IN ($tag_ids_csv_with_apos)"); + $return1 = delete_records_select('tag',"name IN ($tag_ids_csv_with_apos)"); + $return2 = delete_records_select('tag',"id IN ($tag_ids_csv_with_apos)"); + + return $return1 && $return2; } @@ -1211,7 +1214,7 @@ function print_tag_management_box($tag_object, $return=false) { // if the user is not tagged with the $tag_object tag, a link "add blahblah to my interests" will appear if( !is_item_tagged_with('user', $USER->id, $tag_object->id )) { - $addtaglink = ''; + $addtaglink = ''; $addtaglink .= get_string('addtagtomyinterests','tag',$tagname). ''; $output .= $addtaglink .' | '; } @@ -1222,7 +1225,7 @@ function print_tag_management_box($tag_object, $return=false) { } // flag as inappropriate link - $flagtaglink = ''; + $flagtaglink = ''; $flagtaglink .= get_string('flagasinappropriate','tag',$tagname). ''; $output .= $flagtaglink; @@ -1442,7 +1445,7 @@ function print_tag_search_results($query, $page, $perpage, $return=false) { // link "Add $query to my interests" $addtaglink = ''; if( !is_item_tagged_with('user', $USER->id, $query )) { - $addtaglink = ''; + $addtaglink = ''; $addtaglink .= get_string('addtagtomyinterests','tag',$query). ''; }