Changeset 285 for trunk/dns.cgi


Ignore:
Timestamp:
03/22/12 17:23:00 (13 years ago)
Author:
Kris Deugau
Message:

/trunk

Move action logging for zone delete (deldom/delrevzone) into delZone()
See #35

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns.cgi

    r284 r285  
    415415  } elsif ($webvar{del} eq 'ok') {
    416416    my $pargroup = parentID($dbh, (id => $webvar{id}, type => 'domain', revrec => $webvar{revrec}));
    417     my $dom = domainName($dbh, $webvar{id});
    418417    my ($code,$msg) = delZone($dbh, $webvar{id}, $webvar{revrec});
    419418    if ($code eq 'OK') {
    420       logaction($webvar{id}, $session->param("username"), $pargroup, "Deleted domain $dom");
    421       changepage(page => "domlist", resultmsg => "Deleted domain $dom");
     419      changepage(page => "domlist", resultmsg => $msg);
    422420    } else {
    423       logaction($webvar{id}, $session->param("username"), $pargroup, "Failed to delete domain $dom ($msg)")
    424         if $config{log_failures};
    425       changepage(page => "domlist", errmsg => "Error deleting domain $dom: $msg");
     421      changepage(page => "domlist", errmsg => $msg);
    426422    }
    427423
     
    528524    my ($code,$msg) = delZone($dbh, $webvar{id}, 'y');
    529525    if ($code eq 'OK') {
    530 ##fixme: logaction needs to take "domid OR revid" and some way to know which it is
    531       logaction($webvar{id}, $session->param("username"), $pargroup, "Deleted reverse zone $zone");
    532       changepage(page => "revzones", resultmsg => "Deleted reverse zone $zone");
     526      changepage(page => "revzones", resultmsg => $msg);
    533527    } else {
    534       logaction($webvar{id}, $session->param("username"), $pargroup, "Failed to delete domain $zone ($msg)")
    535         if $config{log_failures};
    536 #push @debugbits, "got back $code, $msg\n";
    537       changepage(page => "revzones", errmsg => "Error deleting reverse zone $zone: $msg");
     528      changepage(page => "revzones", errmsg => $msg);
    538529    }
    539530
Note: See TracChangeset for help on using the changeset viewer.