Changeset 582 for trunk/cgi-bin/main.cgi
- Timestamp:
- 01/04/13 17:19:57 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/main.cgi
r577 r582 17 17 use POSIX qw(ceil); 18 18 use NetAddr::IP; 19 use Frontier::Client; 19 20 20 21 use Sys::Syslog; … … 100 101 $aclerr = 'addmaster'; 101 102 } 103 104 # Retrieve the list of DNS locations if we've got a place to grab them from 105 if ($IPDB::rpc_url) { 106 # Make an object to represent the XML-RPC server. 107 my $server = Frontier::Client->new(url => $IPDB::rpc_url, debug => 0); 108 my $result; 109 110 my %rpcargs = ( 111 rpcuser => $authuser, 112 rpcsystem => 'ipdb', 113 group => 1, # bleh 114 defloc => '', 115 ); 116 $result = $server->call('dnsdb.getLocDropdown', %rpcargs); 117 $page->param(loclist => $result); 118 } 119 102 120 } elsif ($webvar{action} eq 'newmaster') { 103 121 … … 108 126 $page->param(cidr => "$cidr"); 109 127 110 my ($code,$msg) = addMaster($ip_dbh, $webvar{cidr}); 128 my ($code,$msg) = addMaster($ip_dbh, $webvar{cidr}, (vrf => $webvar{vrf}, rdns => $webvar{rdns}, 129 rwhois => $webvar{rwhois}, defloc => $webvar{loc}, user => $authuser) ); 111 130 112 131 if ($code eq 'FAIL') { … … 114 133 $page->param(err => $msg); 115 134 } else { 135 if ($code eq 'WARN') { 136 $msg =~ s/\n\n/<br>\n/g; 137 $msg =~ s/:\n/:<br>\n/g; 138 $page->param(warn => $msg); 139 } 116 140 syslog "info", "$authuser added master block $webvar{cidr}"; 117 141 }
Note:
See TracChangeset
for help on using the changeset viewer.