[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.4-477-g9bc1556
Kevin Falcone
falcone at bestpractical.com
Wed Nov 17 15:37:08 EST 2010
The branch, 3.9-trunk has been updated
via 9bc155684493991f8fb320bc375a7fc8f3c391ca (commit)
via d5f3a392936ae32d54c591f5faaf8d681ef47a1c (commit)
from 0fafcd7edd6b9814d895619a40d3af880263ba64 (commit)
Summary of changes:
lib/RT/SavedSearches.pm | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
- Log -----------------------------------------------------------------
commit d5f3a392936ae32d54c591f5faaf8d681ef47a1c
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Wed Nov 17 15:29:58 2010 -0500
Remove some tabs
diff --git a/lib/RT/SavedSearches.pm b/lib/RT/SavedSearches.pm
index 4ead2e6..364e847 100644
--- a/lib/RT/SavedSearches.pm
+++ b/lib/RT/SavedSearches.pm
@@ -102,16 +102,16 @@ sub LimitToPrivacy {
my $object = $self->_GetObject($privacy);
if ($object) {
- $self->{'objects'} = [];
- my @search_atts = $object->Attributes->Named('SavedSearch');
- foreach my $att (@search_atts) {
- my $search = RT::SavedSearch->new($self->CurrentUser);
- $search->Load($privacy, $att->Id);
- next if $type && $search->Type ne $type;
- push(@{$self->{'objects'}}, $search);
- }
+ $self->{'objects'} = [];
+ my @search_atts = $object->Attributes->Named('SavedSearch');
+ foreach my $att (@search_atts) {
+ my $search = RT::SavedSearch->new($self->CurrentUser);
+ $search->Load($privacy, $att->Id);
+ next if $type && $search->Type ne $type;
+ push(@{$self->{'objects'}}, $search);
+ }
} else {
- $RT::Logger->error("Could not load object $privacy");
+ $RT::Logger->error("Could not load object $privacy");
}
}
@@ -127,10 +127,10 @@ sub Next {
my $self = shift;
my $search = $self->{'objects'}->[$self->{'idx'}];
if ($search) {
- $self->{'idx'}++;
+ $self->{'idx'}++;
} else {
- # We have run out of objects; reset the counter.
- $self->{'idx'} = 0;
+ # We have run out of objects; reset the counter.
+ $self->{'idx'} = 0;
}
return $search;
}
commit 9bc155684493991f8fb320bc375a7fc8f3c391ca
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Wed Nov 17 15:34:05 2010 -0500
Handle SearchTypeless SavedSearches gracefully
3.4 3.6 and early 3.8s wouldn't include SearchType in the saved search
attribute. This was fixed with the introduction of Dashboards. The
code in Search/Build.html does a variant on this check for Type'less
searches. These two code paths want to be merged badly.
diff --git a/lib/RT/SavedSearches.pm b/lib/RT/SavedSearches.pm
index 364e847..d73ac72 100644
--- a/lib/RT/SavedSearches.pm
+++ b/lib/RT/SavedSearches.pm
@@ -107,7 +107,7 @@ sub LimitToPrivacy {
foreach my $att (@search_atts) {
my $search = RT::SavedSearch->new($self->CurrentUser);
$search->Load($privacy, $att->Id);
- next if $type && $search->Type ne $type;
+ next if $type && $search->Type && $search->Type ne $type;
push(@{$self->{'objects'}}, $search);
}
} else {
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list