Changeset 950 for trunk/cgi-bin/main.cgi


Ignore:
Timestamp:
08/02/24 11:23:50 (5 months ago)
Author:
Kris Deugau
Message:

/trunk

Import a refinement to per-IP rDNS fiddling from production, for new allocations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/main.cgi

    r949 r950  
    885885  # collect per-IP rDNS fields.  only copy over the ones that actually have something in them.
    886886  my %iprev;
    887   foreach (keys %webvar) {
    888     $iprev{$_} = $webvar{$_} if /host_[\d.a-fA-F:]+/ && $webvar{$_};
     887  foreach (sort keys %webvar) {
     888    # skip all but the host_* fields
     889    next unless /^host_[\d.a-fA-F:]+/;
     890    # propagate the per-IP rDNS if present
     891    $iprev{$_} = $webvar{$_} if $webvar{$_};
     892    # set the rDNS to be cleared if there was a value before (was_host_* field),
     893    # but there's no value in the matching visible form field now (host_*)
     894    $iprev{$_} = '' if $webvar{"was_$_"} && !$webvar{$_};
    889895  }
    890896
Note: See TracChangeset for help on using the changeset viewer.