Changeset 61 for trunk


Ignore:
Timestamp:
01/15/10 17:48:50 (15 years ago)
Author:
Kris Deugau
Message:

/trunk

checkpoint, debugging logging/process on deleting domain

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r56 r61  
    243243  my $domid = shift;
    244244
     245return "FAIL", "whee!";
    245246  # Allow transactions, and raise an exception on errors so we can catch it later.
    246247  # Use local to make sure these get "reset" properly on exiting this block
  • trunk/dns.cgi

    r60 r61  
    2525
    2626my @debugbits;  # temp, to be spit out near the end of processing
    27 my $debugenv = 0;
     27my $debugenv = 1;
    2828
    2929# Let's do these templates right...
     
    7777my $searchsubs = $session->param($webvar{page}.'searchsubs');
    7878
    79 push @debugbits, "foo<br>\n" if defined($webvar{searchsubs});
    80 
    8179# nrgh, can't handle login here because we don't have a database handle to check the user/pass with yet
    8280
     
    205203  } elsif ($webvar{del} eq 'ok') {
    206204    my $pargroup = parentID($webvar{id}, 'dom', 'group');
     205    my $dom = domainName($dbh, $webvar{id});
    207206    my ($code,$msg) = delDomain($dbh, $webvar{id});
    208207    if ($code ne 'OK') {
     
    210209      $page->param(del_failed => 1);
    211210      $page->param(errmsg => $msg);
     211      logaction($webvar{id}, $session->param("username"), $pargroup, "Failed to delete domain $dom");
    212212      listdomains($curgroup);
     213##work
    213214    } else {
    214 ##fixme: need domain to put in log message
    215      logaction($webvar{id}, $session->param("username"), $pargroup, "Deleted domain $webvar{domain}");
    216      changepage(page => "domlist");
     215      logaction($webvar{id}, $session->param("username"), $pargroup, "Deleted domain $dom");
     216      changepage(page => "domlist");
    217217    }
    218218  } else {
     
    251251
    252252} elsif ($webvar{page} eq 'record') {
    253 
    254 $debugenv = 1;
    255253
    256254  if ($webvar{recact} eq 'new') {
     
    712710  my $id = $curgroup;  # we do this because the group log may be called from (almost) any page,
    713711                       # but the others are much more limited.  this is probably non-optimal.
    714   if ($werbvar{ltype} && $webvar{ltype} eq 'user') {
     712  if ($webvar{ltype} && $webvar{ltype} eq 'user') {
    715713    $sql .= "user_id=?";
    716714    $id = $webvar{id};
     
    10131011##fixme:  $logingroup or $curgroup?
    10141012  my @childgroups;
    1015   #getChildren($dbh, $curgroup, \@childgroups, 'all') if $searchsubs;
     1013  getChildren($dbh, $curgroup, \@childgroups, 'all') if $searchsubs;
    10161014  my $childlist = join(',',@childgroups);
    10171015
Note: See TracChangeset for help on using the changeset viewer.