[vhffs-dev] [1202] Don' t log error message when an object is tagged twice with the same tag.

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1202
Author:   beuss
Date:     2008-05-23 18:29:12 +0200 (Fri, 23 May 2008)

Log Message:
-----------
Don't log error message when an object is tagged twice with the same tag.
Fixed typo on "unable to add tag" in project prefs.

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Tag.pm
    trunk/vhffs-panel/group/prefs.pl


Modified: trunk/vhffs-api/src/Vhffs/Tag.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Tag.pm	2008-05-23 11:44:04 UTC (rev 1201)
+++ trunk/vhffs-api/src/Vhffs/Tag.pm	2008-05-23 16:29:12 UTC (rev 1202)
@@ -220,6 +220,9 @@
 	my $dbh = $o->get_db_object();
 	$updated = time() unless($updated);
 	
+	# Don't fill error log with useless error messages.
+	local $dbh->{PrintError} = 0;
+	
 	return $dbh->do(q{INSERT INTO vhffs_object_tag(object_id, tag_id, updated, updater_id) VALUES(?, ?, ?, ?)},
 		undef, $o->get_oid(), $tag->{tag_id}, $updater->get_uid(), $updated);
 }

Modified: trunk/vhffs-panel/group/prefs.pl
===================================================================
--- trunk/vhffs-panel/group/prefs.pl	2008-05-23 11:44:04 UTC (rev 1201)
+++ trunk/vhffs-panel/group/prefs.pl	2008-05-23 16:29:12 UTC (rev 1202)
@@ -338,7 +338,7 @@
 	if($group->add_tag($tag, $user)) {
 		$panel->add_info( gettext('Tag added') );
 	} else {
-		$panel->add_error( gettext('Unable to delete tag') );
+		$panel->add_error( gettext('Unable to add tag, check it was not already added to your project') );
 	}
 }
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/