[Rt-commit] r2472 - rt/branches/QUEBEC-EXPERIMENTAL/html/Search
clkao at bestpractical.com
clkao at bestpractical.com
Wed Mar 16 01:31:43 EST 2005
Author: clkao
Date: Wed Mar 16 01:31:43 2005
New Revision: 2472
Modified:
rt/branches/QUEBEC-EXPERIMENTAL/html/Search/Build.html
Log:
Make the error more readable and prevent side-effect on failed
savesearch.
Modified: rt/branches/QUEBEC-EXPERIMENTAL/html/Search/Build.html
==============================================================================
--- rt/branches/QUEBEC-EXPERIMENTAL/html/Search/Build.html (original)
+++ rt/branches/QUEBEC-EXPERIMENTAL/html/Search/Build.html Wed Mar 16 01:31:43 2005
@@ -774,20 +774,21 @@
RowsPerPage => $RowsPerPage,
}
);
- $search =
- $session{'CurrentUser'}->UserObj->Attributes->WithId($search_id);
-
- # Build new SearchId
- $SearchId =
- ref( $session{'CurrentUser'}->UserObj ) . '-'
- . $session{'CurrentUser'}->UserObj->Id
- . '-SavedSearch-'
- . $search->Id;
- }
- unless ( $search->id ) {
- push @actions, [ loc("Can't find a saved search to work with"), 0 ];
- }
+ if ( $search_id ) {
+ $search =
+ $session{'CurrentUser'}->UserObj->Attributes->WithId($search_id);
+ # Build new SearchId
+ $SearchId =
+ ref( $session{'CurrentUser'}->UserObj ) . '-'
+ . $session{'CurrentUser'}->UserObj->Id
+ . '-SavedSearch-'
+ . $search->Id;
+ }
+ else {
+ push @actions, [ loc("Can't find a saved search to work with").': '.loc($search_msg), 0 ];
+ }
+ }
}
else {
push @actions, [ loc("Can't save this search"), 0 ];
More information about the Rt-commit
mailing list