Changeset 290 for trunk/dns.cgi
- Timestamp:
- 03/27/12 14:57:39 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r289 r290 780 780 $page->param(recval => $rec->{val}); 781 781 } elsif ($webvar{del} eq 'ok') { 782 # get rec data before we try to delete it783 my $rec = getRecLine($dbh, $webvar{defrec}, $webvar{revrec}, $webvar{id});784 782 my ($code,$msg) = delRec($dbh, $webvar{defrec}, $webvar{revrec}, $webvar{id}); 785 783 if ($code eq 'OK') { 786 if ($webvar{defrec} eq 'y') { 787 my $recclass = ($webvar{revrec} eq 'n' ? 'default record' : 'default reverse record'); 788 ##fixme: log distance for MX; log port/weight/distance for SRV 789 my $restr = "Deleted $recclass '$rec->{host} $typemap{$rec->{type}} $rec->{val}', TTL $rec->{ttl}"; 790 logaction(0, $session->param("username"), $rec->{parid}, $restr); 791 changepage(page => "reclist", id => $webvar{parentid}, defrec => $webvar{defrec}, 792 revrec => $webvar{revrec}, resultmsg => $restr); 793 } else { 794 my $recclass = ($webvar{revrec} eq 'n' ? 'record' : 'reverse record'); 795 my $restr = "Deleted $recclass '$rec->{host} $typemap{$rec->{type}} $rec->{val}', TTL $rec->{ttl}"; 796 logaction($rec->{parid}, $session->param("username"), 797 parentID($dbh, (id => $rec->{parid}, type => 'domain', revrec => $webvar{revrec})), 798 $restr); 799 changepage(page => "reclist", id => $webvar{parentid}, defrec => $webvar{defrec}, 800 revrec => $webvar{revrec}, resultmsg => $restr); 801 } 784 changepage(page => "reclist", id => $webvar{parentid}, defrec => $webvar{defrec}, 785 revrec => $webvar{revrec}, resultmsg => $msg); 802 786 } else { 803 787 ## need to find failure mode 804 if ($config{log_failures}) {805 if ($webvar{defrec} eq 'y') {806 logaction(0, $session->param("username"), $rec->{parid},807 "Failed deleting default record '$rec->{host} $typemap{$rec->{type}} $rec->{val}',".808 " TTL $rec->{ttl} ($msg)");809 } else {810 logaction($rec->{parid}, $session->param("username"),811 parentID($dbh, (id => $rec->{parid}, type => 'domain', revrec => $webvar{revrec})),812 "Failed deleting record '$rec->{host} $typemap{$rec->{type}} $rec->{val}', TTL $rec->{ttl} ($msg)");813 }814 }815 788 changepage(page => "reclist", id => $webvar{parentid}, defrec => $webvar{defrec}, 816 revrec => $webvar{revrec}, errmsg => "Error deleting record: $msg");789 revrec => $webvar{revrec}, errmsg => $msg); 817 790 } 818 791 } else {
Note:
See TracChangeset
for help on using the changeset viewer.