Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r105 r107 1033 1033 delete $ret->{longrec_id}; # remove these since they shouldn't be exposed - the caller 1034 1034 delete $ret->{recdata}; # should not care about "long records" vs normal ones. 1035 $ret->{parid} = (($def eq 'def' or $def eq 'y') ? $ret->{group_id} : $ret->{domain_id}); 1035 1036 1036 1037 return $ret; -
trunk/dns.cgi
r101 r107 449 449 if (!defined($webvar{del})) { 450 450 $page->param(del_getconf => 1); 451 my %rec = getRecLine($dbh,$webvar{defrec},$webvar{id});452 $page->param(host => $rec {host});453 $page->param(ftype => $typemap{$rec {type}});454 $page->param(recval => $rec {val});451 my $rec = getRecLine($dbh,$webvar{defrec},$webvar{id}); 452 $page->param(host => $rec->{host}); 453 $page->param(ftype => $typemap{$rec->{type}}); 454 $page->param(recval => $rec->{val}); 455 455 } elsif ($webvar{del} eq 'ok') { 456 456 # get rec data before we try to delete it 457 my %rec = getRecLine($dbh,$webvar{defrec},$webvar{id});457 my $rec = getRecLine($dbh,$webvar{defrec},$webvar{id}); 458 458 my ($code,$msg) = delRec($dbh,$webvar{defrec},$webvar{id}); 459 459 if ($code ne 'OK') { 460 460 ## need to find failure mode 461 461 if ($webvar{defrec} eq 'y') { 462 logaction(0, $session->param("username"), $rec{parid}, 463 "Failed deleting default record '$rec{host} $typemap{$rec{type}} $rec{val}', TTL $rec{ttl} ($msg)"); 462 logaction(0, $session->param("username"), $rec->{parid}, 463 "Failed deleting default record '$rec->{host} $typemap{$rec->{type}} $rec->{val}',". 464 " TTL $rec->{ttl} ($msg)"); 464 465 } else { 465 logaction($rec {parid}, $session->param("username"), parentID($rec{parid}, 'dom', 'group'),466 "Failed deleting record '$rec {host} $typemap{$rec{type}} $rec{val}', TTL $rec{ttl} ($msg)");466 logaction($rec->{parid}, $session->param("username"), parentID($rec->{parid}, 'dom', 'group'), 467 "Failed deleting record '$rec->{host} $typemap{$rec->{type}} $rec->{val}', TTL $rec->{ttl} ($msg)"); 467 468 } 468 469 changepage(page => "reclist", id => $webvar{parentid}, defrec => $webvar{defrec}, … … 473 474 } else { 474 475 if ($webvar{defrec} eq 'y') { 475 logaction(0, $session->param("username"), $rec {parid},476 "Deleted default record '$rec {host} $typemap{$rec{type}} $rec{val}', TTL $rec{ttl}");476 logaction(0, $session->param("username"), $rec->{parid}, 477 "Deleted default record '$rec->{host} $typemap{$rec->{type}} $rec->{val}', TTL $rec->{ttl}"); 477 478 } else { 478 logaction($rec {parid}, $session->param("username"), parentID($rec{parid}, 'dom', 'group'),479 "Deleted record '$rec {host} $typemap{$rec{type}} $rec{val}', TTL $rec{ttl}");479 logaction($rec->{parid}, $session->param("username"), parentID($rec->{parid}, 'dom', 'group'), 480 "Deleted record '$rec->{host} $typemap{$rec->{type}} $rec->{val}', TTL $rec->{ttl}"); 480 481 } 481 482 changepage(page => "reclist", id => $webvar{parentid}, defrec => $webvar{defrec}); … … 1688 1689 1689 1690 $sth = $dbh->prepare("INSERT INTO log (domain_id,user_id,group_id,email,name,entry) ". 1690 "VALUES (?,?,?,?,?,?)") ;1691 $sth->execute($domid,$user_id,$groupid,$username,$fullname,$entry) ;1691 "VALUES (?,?,?,?,?,?)") or warn $dbh->errstr; 1692 $sth->execute($domid,$user_id,$groupid,$username,$fullname,$entry) or warn $sth->errstr; 1692 1693 } # end logaction() 1693 1694
Note:
See TracChangeset
for help on using the changeset viewer.