[Rt-commit] rt branch, 4.2/has-bookmark, created. rt-4.1.6-406-ga1aabb8
Alex Vandiver
alexmv at bestpractical.com
Mon Apr 1 15:52:39 EDT 2013
The branch, 4.2/has-bookmark has been created
at a1aabb80b61f8a169e62cbb6bdb2b3ff1964f1f9 (commit)
- Log -----------------------------------------------------------------
commit a1aabb80b61f8a169e62cbb6bdb2b3ff1964f1f9
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Apr 1 15:51:03 2013 -0400
Fix implementation of HasBookmark to not always return true
3cd39ce refactored HasBookmark into RT::User from RT::Ticket, but in
doing so inexplicably made it into a tautology; if any one ticket was
bookmarked, all tickets passed to HasBookmark would return true.
Return to the pre-3cd39ce logic, which is correct.
diff --git a/lib/RT/User.pm b/lib/RT/User.pm
index 3eb1b15..25f7427 100644
--- a/lib/RT/User.pm
+++ b/lib/RT/User.pm
@@ -1854,7 +1854,7 @@ sub HasBookmark {
my $bookmarks = $self->FirstAttribute('Bookmarks');
$bookmarks = $bookmarks ? $bookmarks->Content : {};
- my @bookmarked = grep { $bookmarks->{ $_ } } $self->Bookmarks;
+ my @bookmarked = grep { $bookmarks->{ $_ } } @ids;
return @bookmarked ? 1 : 0;
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list