Changeset 455


Ignore:
Timestamp:
07/30/10 15:40:36 (14 years ago)
Author:
Kris Deugau
Message:

/trunk

Remove reference to legacy oldcustid field - leftovers from a
billing system transition. See #26.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/ipdb.psql

    r417 r455  
    7676        "pool" cidr DEFAULT '255.255.255.255/32' NOT NULL,
    7777        "ip" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY,
    78         "oldcustid" character varying(16) DEFAULT '' NOT NULL,
    7978        "city" character varying(30) DEFAULT '' NOT NULL,
    8079        "type" character(2) DEFAULT '' NOT NULL,
     
    9594CREATE TABLE "allocations" (
    9695        "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY,
    97         "oldcustid" character varying(16) DEFAULT '',
    9896        "type" character(2) DEFAULT '',
    9997        "city" character varying(30) DEFAULT '',
     
    112110GRANT ALL on "allocations" to "ipdb";
    113111
    114 CREATE VIEW "searchme" as SELECT allocations.cidr, allocations.custid, allocations."type", allocations.city, allocations.description, allocations.notes, allocations.oldcustid, allocations.circuitid FROM allocations UNION SELECT poolips.ip, poolips.custid, poolips.type, poolips.city, poolips.description, poolips.notes, poolips.oldcustid, poolips.circuitid FROM poolips;
     112CREATE VIEW "searchme" as SELECT allocations.cidr, allocations.custid, allocations."type", allocations.city, allocations.description, allocations.notes, allocations.circuitid FROM allocations UNION SELECT poolips.ip, poolips.custid, poolips.type, poolips.city, poolips.description, poolips.notes, poolips.circuitid FROM poolips;
    115113
    116114REVOKE ALL on "searchme" from PUBLIC;
  • trunk/cgi-bin/main.cgi

    r442 r455  
    997997  # because I'm lazy, we'll try to make the SELECT's bring out identical)ish) data
    998998  if ($webvar{block} =~ /\/32$/) {
    999     $sql = "select ip,custid,type,city,circuitid,description,notes,modifystamp,privdata,oldcustid from poolips where ip='$webvar{block}'";
     999    $sql = "select ip,custid,type,city,circuitid,description,notes,modifystamp,privdata from poolips where ip='$webvar{block}'";
    10001000  } else {
    1001     $sql = "select cidr,custid,type,city,circuitid,description,notes,modifystamp,privdata,oldcustid,swip from allocations where cidr='$webvar{block}'"
     1001    $sql = "select cidr,custid,type,city,circuitid,description,notes,modifystamp,privdata,swip from allocations where cidr='$webvar{block}'"
    10021002  }
    10031003
     
    10741074  }
    10751075## end node hack
    1076     $html =~ s/\$\$OLDCUSTID\$\$/$data[9]/g;
    10771076    $html =~ s/\$\$CITY\$\$/<input type=text name=city value="$data[3]">/g;
    10781077    $html =~ s/\$\$CIRCID\$\$/<input type="text" name="circid" value="$data[4]" maxlength=64 size=64 class="regular">/g;
     
    10921091## end node hack
    10931092    $html =~ s/\$\$CUSTID\$\$/$data[1]/g;
    1094     $html =~ s/\$\$OLDCUSTID\$\$/$data[9]/g;
    10951093    $html =~ s/\$\$TYPESELECT\$\$/$disp_alloctypes{$data[2]}/g;
    10961094    $html =~ s/\$\$CITY\$\$/$data[3]/g;
  • trunk/cgi-bin/search.cgi

    r439 r455  
    128128  my $sql = "(select $cols from searchme where".
    129129        " $webvar{custexclude} (custid ilike '%$webvar{custid}%'".
    130         " OR $webvar{custexclude} oldcustid ilike '%$webvar{custid}%'))".
    131130        " $sqlconcat (select $cols from searchme where $webvar{descexclude} description ilike '%$webvar{desc}%')".
    132131        " $sqlconcat (select $cols from searchme where $webvar{notesexclude} notes ilike '%$webvar{notes}%')";
     
    335334    # Query for a customer ID.  Note that we can't restrict to "numeric-only"
    336335    # as we have non-numeric custIDs in the legacy data.  :/
    337     $sql = "select $cols from searchme where custid ilike '%$query%' or oldcustid ilike '%$query%' or description like '%$query%'";
     336    $sql = "select $cols from searchme where custid ilike '%$query%' or description like '%$query%'";
    338337    my $count = countRows($sql);
    339338    $sql .= " order by cidr limit $RESULTS_PER_PAGE offset $offset";
  • trunk/editDisplay.html

    r397 r455  
    1515
    1616<tr class="color2"><td class=heading>CustID:</td><td class="regular">$$CUSTID$$</td></tr>
    17 <tr class="color2"><td class=heading>Old CustID:</td><td class="regular">$$OLDCUSTID$$</td></tr>
    1817
    1918<tr class="color2"><td class=heading>SWIPed?:</td><td class=regular>$$SWIP$$</td></tr>
Note: See TracChangeset for help on using the changeset viewer.