Delete white spaces before and after the search string.

Ignore empty queries.
This commit is contained in:
Wolfram Schneider 1998-06-16 18:07:52 +00:00
parent 97388f3d01
commit 26b386a89d
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/www/; revision=2955
2 changed files with 10 additions and 4 deletions

View file

@ -24,7 +24,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $Id: ports.cgi,v 1.20 1998-06-01 16:15:03 wosch Exp $
# $Id: ports.cgi,v 1.21 1998-06-16 18:07:52 wosch Exp $
#
# ports.cgi - search engine for FreeBSD ports
# o search for a port by name or description
@ -593,7 +593,10 @@ if (!$query && !$type && $query_string =~ /^([^=&]+)$/) {
@sec = &readcoll;
&forms;
if ($query_string eq "") {
$query =~ s/^\s+//;
$query =~ s/\s+$//;
if ($query_string eq "" || (!$query && !$type)) {
&footer; &footer2; &exit(0);
}

View file

@ -24,7 +24,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $Id: ports.cgi,v 1.20 1998-06-01 16:15:03 wosch Exp $
# $Id: ports.cgi,v 1.21 1998-06-16 18:07:52 wosch Exp $
#
# ports.cgi - search engine for FreeBSD ports
# o search for a port by name or description
@ -593,7 +593,10 @@ if (!$query && !$type && $query_string =~ /^([^=&]+)$/) {
@sec = &readcoll;
&forms;
if ($query_string eq "") {
$query =~ s/^\s+//;
$query =~ s/\s+$//;
if ($query_string eq "" || (!$query && !$type)) {
&footer; &footer2; &exit(0);
}