- Timestamp:
- 10/28/11 16:56:10 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r155 r157 1479 1479 ##todo: immediate, secondary, full (default) 1480 1480 1481 # Return false on invalid types 1482 return 0 if !grep /^$type1$/, ('record','defrec','user','domain','group'); 1483 return 0 if !grep /^$type2$/, ('record','defrec','user','domain','group'); 1484 1481 1485 # Return false on impossible relations 1482 1486 return 0 if $type1 eq 'record'; # nothing may be a child of a record … … 1499 1503 my $sql = "SELECT $par_col{$type} FROM $par_tbl{$type} WHERE $id_col{$type} = ?"; 1500 1504 my $result = $dbh->selectrow_hashref($sql, 1501 undef, ($id) ) or warn $dbh->errstr." $sql";1502 if ($result ->{$par_col{$type}} == $id1) {1505 undef, ($id) ); 1506 if ($result && $result->{$par_col{$type}} == $id1) { 1503 1507 $foundparent = 1; 1508 last; 1509 } else { 1510 ##fixme: do we care about trying to return a "no such record/domain/user/group" error? 1511 warn $dbh->errstr." $sql, $id" if $dbh->errstr; 1504 1512 last; 1505 1513 }
Note:
See TracChangeset
for help on using the changeset viewer.