Delete white spaces before and after the search string.
Ignore empty queries.
This commit is contained in:
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
|
@ -24,7 +24,7 @@
|
||||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
# SUCH DAMAGE.
|
# 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
|
# ports.cgi - search engine for FreeBSD ports
|
||||||
# o search for a port by name or description
|
# o search for a port by name or description
|
||||||
|
@ -593,7 +593,10 @@ if (!$query && !$type && $query_string =~ /^([^=&]+)$/) {
|
||||||
@sec = &readcoll;
|
@sec = &readcoll;
|
||||||
&forms;
|
&forms;
|
||||||
|
|
||||||
if ($query_string eq "") {
|
$query =~ s/^\s+//;
|
||||||
|
$query =~ s/\s+$//;
|
||||||
|
|
||||||
|
if ($query_string eq "" || (!$query && !$type)) {
|
||||||
&footer; &footer2; &exit(0);
|
&footer; &footer2; &exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
# SUCH DAMAGE.
|
# 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
|
# ports.cgi - search engine for FreeBSD ports
|
||||||
# o search for a port by name or description
|
# o search for a port by name or description
|
||||||
|
@ -593,7 +593,10 @@ if (!$query && !$type && $query_string =~ /^([^=&]+)$/) {
|
||||||
@sec = &readcoll;
|
@sec = &readcoll;
|
||||||
&forms;
|
&forms;
|
||||||
|
|
||||||
if ($query_string eq "") {
|
$query =~ s/^\s+//;
|
||||||
|
$query =~ s/\s+$//;
|
||||||
|
|
||||||
|
if ($query_string eq "" || (!$query && !$type)) {
|
||||||
&footer; &footer2; &exit(0);
|
&footer; &footer2; &exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue