Changeset 307 for branches/stable/cgi-bin/search.cgi
- Timestamp:
- 02/14/06 12:44:32 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/cgi-bin/search.cgi
r303 r307 140 140 ## CIDR query options. 141 141 $webvar{cidr} =~ s/\s+//; # Hates the nasty spaceseseses we does. 142 if ($webvar{cidr} =='') { # We has a blank CIDR. Ignore it.142 if ($webvar{cidr} eq '') { # We has a blank CIDR. Ignore it. 143 143 } elsif ($webvar{cidr} =~ /\//) { 144 144 # 209.91.179/26 should show all /26 subnets in 209.91.179 … … 152 152 # Partial match; beginning of subnet and maskbits are provided 153 153 # Show any blocks with the leading octet(s) and that masklength 154 # Need some more magic for bare /nn searches: 155 my $condition = ($net eq '' ? 156 "masklen(cidr)=$maskbits" : "text(cidr) like '$net%' and masklen(cidr)=$maskbits"); 154 157 $sql .= " $sqlconcat (select $cols from searchme where $webvar{cidrexclude} ". 155 "( text(cidr) like '$net%' and masklen(cidr)=$maskbits))";158 "($condition))"; 156 159 } 157 160 } elsif ($webvar{cidr} =~ /^(\d{1,3}\.){3}\d{1,3}$/) {
Note:
See TracChangeset
for help on using the changeset viewer.