Changeset 473 for trunk/dns.cgi
- Timestamp:
- 03/12/13 17:39:47 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r470 r473 392 392 393 393 $page->param(del_getconf => 1); 394 $page->param(domain => domainName($dbh,$webvar{id}));394 $page->param(domain => $dnsdb->domainName($webvar{id})); 395 395 396 396 } elsif ($webvar{del} eq 'ok') { 397 my $pargroup = parentID($dbh, (id => $webvar{id}, type => 'domain', revrec => $webvar{revrec}));397 my $pargroup = $dnsdb->parentID(id => $webvar{id}, type => 'domain', revrec => $webvar{revrec}); 398 398 my ($code,$msg) = delZone($dbh, $webvar{id}, $webvar{revrec}); 399 399 if ($code eq 'OK') { … … 492 492 493 493 $page->param(del_getconf => 1); 494 $page->param(revzone => revName($dbh,$webvar{id}));494 $page->param(revzone => $dnsdb->revName($webvar{id})); 495 495 496 496 } elsif ($webvar{del} eq 'ok') { 497 my $pargroup = parentID($dbh, (id => $webvar{id}, type => 'revzone', revrec => $webvar{revrec}));498 my $zone = revName($dbh,$webvar{id});497 my $pargroup = $dnsdb->parentID(id => $webvar{id}, type => 'revzone', revrec => $webvar{revrec}); 498 my $zone = $dnsdb->revName($webvar{id}); 499 499 my ($code,$msg) = delZone($dbh, $webvar{id}, 'y'); 500 500 if ($code eq 'OK') { … … 569 569 # fill the page-count and first-previous-next-last-all details 570 570 fill_pgcount($count,"records", 571 ($webvar{defrec} eq 'y' ? "group ". groupName($dbh,$webvar{id}) :572 ($webvar{revrec} eq 'y' ? revName($dbh,$webvar{id}) : domainName($dbh,$webvar{id}))571 ($webvar{defrec} eq 'y' ? "group ".$dnsdb->groupName($webvar{id}) : 572 ($webvar{revrec} eq 'y' ? $dnsdb->revName($webvar{id}) : $dnsdb->domainName($webvar{id})) 573 573 )); 574 574 fill_fpnla($count); # should put some params on this sub... … … 724 724 725 725 if ($webvar{defrec} eq 'y') { 726 $page->param(dohere => "default records in group ". groupName($dbh,$webvar{parentid}));726 $page->param(dohere => "default records in group ".$dnsdb->groupName($webvar{parentid})); 727 727 } else { 728 $page->param(dohere => domainName($dbh,$webvar{parentid})) if $webvar{revrec} eq 'n';729 $page->param(dohere => revName($dbh,$webvar{parentid})) if $webvar{revrec} eq 'y';728 $page->param(dohere => $dnsdb->domainName($webvar{parentid})) if $webvar{revrec} eq 'n'; 729 $page->param(dohere => $dnsdb->revName($webvar{parentid})) if $webvar{revrec} eq 'y'; 730 730 } 731 731 … … 929 929 changepage(page => "grpman"); 930 930 } 931 $page->param(delgroupname => groupName($dbh,$webvar{id}));931 $page->param(delgroupname => $dnsdb->groupName($webvar{id})); 932 932 933 933 } elsif ($webvar{page} eq 'edgroup') { … … 968 968 changepage(page => "grpman", warnmsg => 969 969 "You can only grant permissions you hold. Default permissions in group ". 970 groupName($dbh,$webvar{gid})." updated with reduced access");970 $dnsdb->groupName($webvar{gid})." updated with reduced access"); 971 971 } else { 972 972 changepage(page => "grpman", resultmsg => $msg); … … 978 978 } 979 979 $page->param(gid => $webvar{gid}); 980 $page->param(grpmeddle => groupName($dbh,$webvar{gid}));980 $page->param(grpmeddle => $dnsdb->groupName($webvar{gid})); 981 981 my %grpperms; 982 982 getPermissions($dbh, 'group', $webvar{gid}, \%grpperms); … … 996 996 997 997 $page->param(curpage => $webvar{page}); 998 fill_pgcount($count, 'domains',groupName($dbh,$curgroup));998 fill_pgcount($count, 'domains', $dnsdb->groupName($curgroup)); 999 999 fill_fpnla($count); 1000 1000 $page->param(perpage => $perpage); … … 1026 1026 changepage(page => "domlist", errmsg => "You are not permitted to bulk-move domains") 1027 1027 unless ($permissions{admin} || ($permissions{domain_edit} && $permissions{domain_create} && $permissions{domain_delete})); 1028 my $newgname = groupName($dbh,$webvar{destgroup});1028 my $newgname = $dnsdb->groupName($webvar{destgroup}); 1029 1029 $page->param(action => "Move to group $newgname"); 1030 1030 } elsif ($webvar{bulkaction} eq 'deactivate' || $webvar{bulkaction} eq 'activate') { … … 1056 1056 next; 1057 1057 } 1058 $row{domain} = domainName($dbh,$webvar{$_});1058 $row{domain} = $dnsdb->domainName($webvar{$_}); 1059 1059 1060 1060 # Do the $webvar{bulkaction} … … 1317 1317 if (!defined($webvar{del})) { 1318 1318 $page->param(del_getconf => 1); 1319 $page->param(user => userFullName($dbh,$webvar{id}));1319 $page->param(user => $dnsdb->userFullName($webvar{id})); 1320 1320 } elsif ($webvar{del} eq 'ok') { 1321 1321 my ($code,$msg) = delUser($dbh, $webvar{id}); … … 1627 1627 goto DONELOG; 1628 1628 } 1629 $page->param(logfor => 'user '. userFullName($dbh,$id));1629 $page->param(logfor => 'user '.$dnsdb->userFullName($id)); 1630 1630 } elsif ($webvar{ltype} && $webvar{ltype} eq 'dom') { 1631 1631 $id = $webvar{id}; … … 1634 1634 goto DONELOG; 1635 1635 } 1636 $page->param(logfor => 'domain '. domainName($dbh,$id));1636 $page->param(logfor => 'domain '.$dnsdb->domainName($id)); 1637 1637 } elsif ($webvar{ltype} && $webvar{ltype} eq 'rdns') { 1638 1638 $id = $webvar{id}; … … 1641 1641 goto DONELOG; 1642 1642 } 1643 $page->param(logfor => 'reverse zone '. revName($dbh,$id));1643 $page->param(logfor => 'reverse zone '.$dnsdb->revName($id)); 1644 1644 } else { 1645 1645 # Default to listing curgroup log 1646 $page->param(logfor => 'group '. groupName($dbh,$id));1646 $page->param(logfor => 'group '.$dnsdb->groupName($id)); 1647 1647 # note that scope limitations are applied via the change-group check; 1648 1648 # group log is always for the "current" group … … 1699 1699 1700 1700 $page->param(group => $curgroup); 1701 $page->param(groupname => groupName($dbh,$curgroup));1702 $page->param(logingrp => groupName($dbh,$logingroup));1701 $page->param(groupname => $dnsdb->groupName($curgroup)); 1702 $page->param(logingrp => $dnsdb->groupName($logingroup)); 1703 1703 $page->param(logingrp_num => $logingroup); 1704 1704 … … 1771 1771 foreach (@childlist) { 1772 1772 my %row; 1773 $row{grpname} = groupName($dbh,$_);1773 $row{grpname} = $dnsdb->groupName($_); 1774 1774 $row{grpnum} = $_; 1775 1775 $row{whereami} = $uri_self; … … 1847 1847 # $page->param(group => $DNSDB::group); 1848 1848 $page->param(isgrp => 1) if $defrec eq 'y'; 1849 $page->param(parent => ($defrec eq 'y' ? groupName($dbh,$id) :1850 ($revrec eq 'n' ? domainName($dbh, $id) : revName($dbh,$id)) ) );1849 $page->param(parent => ($defrec eq 'y' ? $dnsdb->groupName($id) : 1850 ($revrec eq 'n' ? $dnsdb->domainName($id) : $dnsdb->revName($id)) ) ); 1851 1851 1852 1852 # defaults … … 1926 1926 # prefill <domain> or DOMAIN in "Host" space for new records 1927 1927 if ($webvar{revrec} eq 'n') { 1928 my $domroot = ($webvar{defrec} eq 'y' ? 'DOMAIN' : domainName($dbh,$webvar{parentid}));1928 my $domroot = ($webvar{defrec} eq 'y' ? 'DOMAIN' : $dnsdb->domainName($webvar{parentid})); 1929 1929 $page->param(name => ($webvar{name} ? $webvar{name} : $domroot)); 1930 1930 $page->param(address => $webvar{address}); … … 1936 1936 my $domroot = ($webvar{defrec} eq 'y' ? 'ADMINDOMAIN' : ".$config{domain}"); 1937 1937 $page->param(name => ($webvar{name} ? $webvar{name} : $domroot)); 1938 my $zname = ($webvar{defrec} eq 'y' ? 'ZONE' : revName($dbh,$webvar{parentid}));1938 my $zname = ($webvar{defrec} eq 'y' ? 'ZONE' : $dnsdb->revName($webvar{parentid})); 1939 1939 $zname =~ s|\d*/\d+$||; 1940 1940 $page->param(address => ($webvar{address} ? $webvar{address} : $zname)); … … 2039 2039 2040 2040 # fill page count and first-previous-next-last-all bits 2041 fill_pgcount($count,($webvar{revrec} eq 'n' ? 'domains' : 'revzones'), groupName($dbh,$curgroup));2041 fill_pgcount($count,($webvar{revrec} eq 'n' ? 'domains' : 'revzones'),$dnsdb->groupName($curgroup)); 2042 2042 fill_fpnla($count); 2043 2043 … … 2151 2151 $row{groupval} = $_; 2152 2152 $row{groupactive} = ($_ == $cur); 2153 $row{groupname} = $indent. groupName($dbh,$_);2153 $row{groupname} = $indent.$dnsdb->groupName($_); 2154 2154 push @{$grplist}, \%row; 2155 2155 getgroupdrop($_, $cur, $grplist, $indent.' '); … … 2159 2159 my @grouplist; 2160 2160 push @grouplist, { groupval => $logingroup, groupactive => $logingroup == $curgroup, 2161 groupname => groupName($dbh,$logingroup) };2161 groupname => $dnsdb->groupName($logingroup) }; 2162 2162 getgroupdrop($logingroup, $curgroup, \@grouplist); 2163 2163
Note:
See TracChangeset
for help on using the changeset viewer.