Ignore:
Timestamp:
09/23/05 15:54:31 (19 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Merge changes from /trunk revisions:

234
237
254 (ipdb.css only)
261
279
284
285

This merges the new search system (234, 237, 254), cleans up
some display CSS (254, 279), cleans up some leftover code (r261),
and merges the "private data" code (284, 285 - note SWIP hacks conflict).

/trunk should now be almost identical to /branches/stable.

File:
1 copied

Legend:

Unmodified
Added
Removed
  • branches/stable/cgi-bin/search.cgi

    r234 r286  
    6060    $webvar{input} =~ s/^\s+//;
    6161    $webvar{input} =~ s/\s+$//;
    62     if ($webvar{input} =~ /^[\d\.]+(\/\d{1,3})?$/) {
     62    if ($webvar{input} =~ /^\d+$/) {
     63      # All-digits, new custID
     64      $searchfor = "cust";
     65    } elsif ($webvar{input} =~ /^[\d\.]+(\/\d{1,3})?$/) {
    6366      # IP addresses should only have numbers, digits, and maybe a slash+netmask
    6467      $searchfor = "ipblock";
    65     } elsif ($webvar{input} =~ /^\d+$/) {
    66       # All-digits, new custID
    67       $searchfor = "cust";
    6868    } else {
    6969      # Anything else.
     
    140140  ## CIDR query options.
    141141  $webvar{cidr} =~ s/\s+//;     # Hates the nasty spaceseseses we does.
    142   if ($webvar{cidr} =~ /\//) {
     142  if ($webvar{cidr} == '') { # We has a blank CIDR.  Ignore it.
     143  } elsif ($webvar{cidr} =~ /\//) {
    143144    # 209.91.179/26 should show all /26 subnets in 209.91.179
    144145    my ($net,$maskbits) = split /\//, $webvar{cidr};
     
    291292    print qq(<div class="heading">Searching for descriptions containing '$query'</div><br>\n);
    292293    # Query based on description (includes "name" from old DB).
    293     $sql = "select * from searchme where description ilike '%$query%'";
     294    $sql = "select * from searchme where description ilike '%$query%'".
     295        " or custid ilike '%$query%'";
    294296    my $count = countRows($sql);
    295297    $sql .= " order by cidr limit $RESULTS_PER_PAGE offset $offset";
Note: See TracChangeset for help on using the changeset viewer.