diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm
index b5ca114564..b543293bbc 100644
--- a/C4/Suggestions.pm
+++ b/C4/Suggestions.pm
@@ -157,17 +157,16 @@ sub SearchSuggestion {
qw( STATUS itemtype suggestedby managedby acceptedby budgetid biblionumber )
)
{
- if ( exists $suggestion->{$field}
- and defined $suggestion->{$field}
- and $suggestion->{$field} ne '__ANY__'
- and $suggestion->{$field} ne q||
- ) {
- if ( $suggestion->{$field} eq '__NONE__' ) {
- push @query, qq{ AND (suggestions.$field = '' OR suggestions.$field IS NULL) };
+ if ( exists $suggestion->{$field} ) {
+ if ( defined $suggestion->{$field} and $suggestion->{$field} ne '' )
+ {
+ push @sql_params, $suggestion->{$field};
+ push @query, qq{ AND suggestions.$field=? };
}
else {
- push @sql_params, $suggestion->{$field};
- push @query, qq{ AND suggestions.$field = ? };
+ push @query, qq{
+ AND (suggestions.$field='' OR suggestions.$field IS NULL)
+ };
}
}
}
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt
index af7e3820a9..a0d9468137 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt
@@ -724,14 +724,7 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o