Changeset 283 for trunk/dns.cgi


Ignore:
Timestamp:
03/22/12 16:12:32 (13 years ago)
Author:
Kris Deugau
Message:

/trunk

Convert zone status change logging to DNSDB-internal. See #35
Add a global for holding general result messages for subs that
return booleans. This allows us to easily display the same text
as was added to the log.
Fix docucomment on mailNotify(); it (still!) referred to its
copy-paste parent in the IP Database.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns.cgi

    r280 r283  
    330330    if ($flag && ($permissions{admin} || $permissions{domain_edit})) {
    331331      my $stat = zoneStatus($dbh,$webvar{id},'n',$webvar{zonestatus});
    332 ##fixme  switch to more consise "Enabled <domain"/"Disabled <domain>" as with users?
    333       logaction($webvar{id}, $session->param("username"),
    334         parentID($dbh, (id => $webvar{id}, type => 'domain', revrec => $webvar{revrec})),
    335         "Changed ".domainName($dbh, $webvar{id})." state to ".($stat ? 'active' : 'inactive'));
    336       $page->param(resultmsg => "Changed ".domainName($dbh, $webvar{id})." state to ".
    337         ($stat ? 'active' : 'inactive'));
     332      $page->param(resultmsg => $DNSDB::resultstr);
    338333    } else {
    339334      $page->param(errmsg => "You are not permitted to view or change the requested domain");
     
    450445    if ($flag && ($permissions{admin} || $permissions{domain_edit})) {
    451446      my $stat = zoneStatus($dbh,$webvar{id},'y',$webvar{zonestatus});
    452 ##fixme  switch to more consise "Enabled <domain"/"Disabled <domain>" as with users?
    453       logaction($webvar{id}, $session->param("username"),
    454         parentID($dbh, (id => $webvar{id}, type => 'revzone', revrec => $webvar{revrec})),
    455         "Changed ".revName($dbh, $webvar{id})." state to ".($stat ? 'active' : 'inactive'));
    456       $page->param(resultmsg => "Changed ".revName($dbh, $webvar{id})." state to ".
    457         ($stat ? 'active' : 'inactive'));
     447      $page->param(resultmsg => $DNSDB::resultstr);
    458448    } else {
    459449      $page->param(errmsg => "You are not permitted to view or change the requested reverse zone");
Note: See TracChangeset for help on using the changeset viewer.