Changeset 719
- Timestamp:
- 05/17/16 15:25:14 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r716 r719 2540 2540 my $dbh = $self->{dbh}; 2541 2541 my $domain = shift; 2542 my ($domid) = $dbh->selectrow_array("SELECT domain_id FROM domains WHERE lower(domain) = lower(?)", 2543 undef, ($domain) ); 2542 my $location = shift; 2543 2544 # Note that location may be *empty*, but it may not be *undefined* 2545 if (!defined($location)) { 2546 $errstr = "Missing location"; 2547 return; 2548 } 2549 2550 my ($domid) = $dbh->selectrow_array( 2551 "SELECT domain_id FROM domains WHERE lower(domain) = lower(?) AND default_location = ?", 2552 undef, ($domain, $location) ); 2544 2553 if (!$domid) { 2545 2554 if ($dbh->err) { … … 2561 2570 my $dbh = $self->{dbh}; 2562 2571 my $revzone = shift; 2563 my ($revid) = $dbh->selectrow_array("SELECT rdns_id FROM revzones WHERE revnet=?", undef, ($revzone) ); 2572 my $location = shift; 2573 2574 # Note that location may be *empty*, but it may not be *undefined* 2575 if (!defined($location)) { 2576 $errstr = "Missing location"; 2577 return; 2578 } 2579 2580 my ($revid) = $dbh->selectrow_array( 2581 "SELECT rdns_id FROM revzones WHERE revnet = ? AND default_location = ?", 2582 undef, ($revzone, $location) ); 2564 2583 if (!$revid) { 2565 2584 if ($dbh->err) {
Note:
See TracChangeset
for help on using the changeset viewer.