When a search is submitted with no query value, instead of silently
redirecting the user the home page, direct the user to the results page
and show a helpful message (within the low-hits template).
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
} else {
- if (!$query) {
- return Apache2::Const::OK if $internal;
- return $self->generic_redirect;
- }
+ return Apache2::Const::OK unless $query;
# Limit and offset will stay here. Everything else should be part of
# the query string, not special args.
IF is_advanced OR is_special;
l('Sorry, no entries were found for your search.');
ELSE;
- l('Sorry, no entries were found for [_1].', '<q>' _ qhtml _ '</q>');
+ IF !qhtml;
+ l('Please enter a search term in the Search box.');
+ ELSE;
+ l('Sorry, no entries were found for [_1].', '<q>' _ qhtml _ '</q>');
+ END;
END;
END %]
</p>