[Rt-commit] rt branch, 4.0/mobile-searches, created. rt-4.0.0rc7-1-gd7b42d7
Kevin Falcone
falcone at bestpractical.com
Tue Mar 22 16:33:09 EDT 2011
The branch, 4.0/mobile-searches has been created
at d7b42d74f3c4f8a749912b0e4091d304d780b5eb (commit)
- Log -----------------------------------------------------------------
commit d7b42d74f3c4f8a749912b0e4091d304d780b5eb
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Mon Mar 21 16:10:57 2011 -0400
Older versions of RT didn't always set a SearchType
We don't currently have an upgrading script for this and a ton of RT's
code code works around this by defaulting to an empty SearchType meaning
that it is a Ticket search.
diff --git a/share/html/m/_elements/menu b/share/html/m/_elements/menu
index 3236223..6be7bd5 100644
--- a/share/html/m/_elements/menu
+++ b/share/html/m/_elements/menu
@@ -98,7 +98,7 @@ if ( $session{'CurrentUser'}->HasRight( Right => 'LoadSavedSearch', Object => $
foreach my $object (@Objects) {
my @searches = $object->Attributes->Named('SavedSearch');
foreach my $search (@searches) {
- next unless $search->SubValue("SearchType") eq 'Ticket';
+ next if $search->SubValue("SearchType") && $search->SubValue("SearchType") ne 'Ticket';
push @menu, { label => $search->Description, url => '/m/tickets/search?query=' . $search->SubValue("Query").'&order='.$search->SubValue("Order").'&order_by='.$search->SubValue("OrderBy") };
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list