
jesse at bestpractical
Nov 6, 2009, 1:18 PM
Post #1 of 1
(88 views)
Permalink
|
|
rt branch, librarize-search-logic, updated. 6afbe47e066099cfe87d2030a5ee7dff263a7465
|
|
The branch, librarize-search-logic has been updated via 6afbe47e066099cfe87d2030a5ee7dff263a7465 (commit) from 25d69933c91b683cbc913812044c87f5c5c2312d (commit) Summary of changes: lib/RT/Interface/Web/QueryBuilder.pm | 2 -- share/html/Search/Build.html | 5 +++-- share/html/Ticket/Graphs/index.html | 5 +++-- 3 files changed, 6 insertions(+), 6 deletions(-) - Log ----------------------------------------------------------------- commit 6afbe47e066099cfe87d2030a5ee7dff263a7465 Author: Jesse Vincent <jesse[at]bestpractical.com> Date: Fri Nov 6 16:17:06 2009 -0500 move the "should we save a search" check back out to the calling code diff --git a/lib/RT/Interface/Web/QueryBuilder.pm b/lib/RT/Interface/Web/QueryBuilder.pm index b58bad8..68c511a 100644 --- a/lib/RT/Interface/Web/QueryBuilder.pm +++ b/lib/RT/Interface/Web/QueryBuilder.pm @@ -310,12 +310,10 @@ sub load_saved_search { sub save_search { my $self = shift; - my $ARGS = shift; my $query = shift; my $saved_search = shift; my $search_fields = shift || [qw( query format order_by order rows_per_page)]; - return unless $ARGS->{'saved_search_save'} || $ARGS->{'saved_search_copy'}; my @results; my $obj = $saved_search->{'object'}; diff --git a/share/html/Search/Build.html b/share/html/Search/Build.html index 44dc383..cd5c8ac 100644 --- a/share/html/Search/Build.html +++ b/share/html/Search/Build.html @@ -153,8 +153,9 @@ my ( $available_columns, $current_format ); ); # if we're asked to save the current search, save it -push @actions, RT::Interface::Web::QueryBuilder->save_search( \%ARGS, \%query, $saved_search ); - +if( $ARGS{'saved_search_save'} || $ARGS{'saved_search_copy'}) { +push @actions, RT::Interface::Web::QueryBuilder->save_search( \%query, $saved_search ); +} # Push the updates into the session so we don't loose 'em Jifty->web->session->set( 'CurrentSearchHash', { %query, diff --git a/share/html/Ticket/Graphs/index.html b/share/html/Ticket/Graphs/index.html index 52ab0aa..b78c265 100644 --- a/share/html/Ticket/Graphs/index.html +++ b/share/html/Ticket/Graphs/index.html @@ -99,7 +99,8 @@ if ( $ARGS{'show_links'} && !ref $ARGS{'show_links'} ) { $ARGS{'show_links'} = [ grep $_ ne $ARGS{'leading_link'}, @{ $ARGS{'show_links'} } ]; $ARGS{'max_depth'} = 3 unless defined $ARGS{'max_depth'} && length $ARGS{'max_depth'}; -push @results, RT::Interface::Web::QueryBuilder->save_search(\%ARGS, \%ARGS, $saved_search, \@save_arguments); - +if( $ARGS{'saved_search_save'} || $ARGS{'saved_search_copy'}) { +push @results, RT::Interface::Web::QueryBuilder->save_search(\%ARGS, $saved_search, \@save_arguments); +} my $title = _( "Ticket #%1 relationships graph", $id ); </%INIT> ----------------------------------------------------------------------- _______________________________________________ Rt-commit mailing list Rt-commit[at]lists.bestpractical.com http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-commit
|