Changeset 259 for trunk


Ignore:
Timestamp:
03/02/12 17:19:06 (13 years ago)
Author:
Kris Deugau
Message:

/trunk

More fixing on _log() and its callers and its caller's information
sources - general logic and behaviour cleanup this time

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r258 r259  
    10201020    ($args{user_id}, $fullname) = $dbh->selectrow_array("SELECT user_id, firstname || ' ' || lastname FROM users".
    10211021        " WHERE username=?", undef, ($args{username}));
    1022   } elsif (!$args{username}) {
     1022  }
     1023  if (!$args{username}) {
    10231024    ($args{username}, $fullname) = $dbh->selectrow_array("SELECT username, firstname || ' ' || lastname FROM users".
    10241025        " WHERE user_id=?", undef, ($args{user_id}));
    1025   } else {
     1026  }
     1027  if (!$args{fullname}) {
    10261028    ($fullname) = $dbh->selectrow_array("SELECT firstname || ' ' || lastname FROM users".
    10271029        " WHERE user_id=?", undef, ($args{user_id}));
     
    10921094    ($dom_id) = $dbh->selectrow_array("SELECT domain_id FROM domains WHERE domain=?", undef, ($domain));
    10931095
    1094     _log($dbh, (domain_id => $dom_id, user_id => $userinfo{id}, group_id => $group, username => $userinfo{name},
    1095                 name => $userinfo{fullname}, entry => "Added ".($state ? 'active' : 'inactive')." domain $domain"));
     1096    _log($dbh, (domain_id => $dom_id, user_id => $userinfo{id}, group_id => $group, username => $userinfo{username},
     1097        entry => "Added ".($state ? 'active' : 'inactive')." domain $domain"));
    10961098
    10971099    # ... and now we construct the standard records from the default set.  NB:  group should be variable.
     
    11081110        my @tmp2 = split /:/, $val;
    11091111        _log($dbh, (domain_id => $dom_id, user_id => $userinfo{id}, group_id => $group,
    1110                 username => $userinfo{name}, name => $userinfo{fullname}, entry =>
     1112                username => $userinfo{username}, entry =>
    11111113                "[new $domain] Added SOA record [contact $tmp1[0]] [master $tmp1[1]] ".
    11121114                "[refresh $tmp2[0]] [retry $tmp2[1]] [expire $tmp2[2]] [minttl $tmp2[3]], TTL $ttl"));
     
    11161118        $logentry .= " [priority $dist] [weight $weight] [port $port]" if $typemap{$type} eq 'SRV';
    11171119        _log($dbh, (domain_id => $dom_id, user_id => $userinfo{id}, group_id => $group,
    1118                 username => $userinfo{name}, name => $userinfo{fullname}, entry =>
     1120                username => $userinfo{username}, entry =>
    11191121                $logentry." $val', TTL $ttl"));
    11201122      }
  • trunk/dns.cgi

    r254 r259  
    369369
    370370  my ($code,$msg) = addDomain($dbh,$webvar{domain},$webvar{group},($webvar{makeactive} eq 'on' ? 1 : 0),
    371         (name => $session->param("username"), id => $session->param("uid")));
     371        (username => $session->param("username"), id => $session->param("uid")));
    372372
    373373  if ($code eq 'OK') {
Note: See TracChangeset for help on using the changeset viewer.