Changeset 470 for trunk/DNSDB.pm


Ignore:
Timestamp:
03/12/13 16:19:08 (11 years ago)
Author:
Kris Deugau
Message:

/trunk

Object conversion of DNSDB.pm, 6 of <mumble>. See #11.

  • convert isParent(), fix up partial caller conversion that shouldn't have been committed in r469
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r469 r470  
    41584158# Returns true if $id1 is a parent of $id2, false otherwise
    41594159sub isParent {
    4160   my $dbh = shift;
     4160  my $self = shift;
     4161  my $dbh = $self->{dbh};
    41614162  my $id1 = shift;
    41624163  my $type1 = shift;
     
    42024203    return 1 if $type1 eq 'revzone' && $id1 == $rdns;
    42034204    # if request is group, check *both* parents.  Only check if the parent is nonzero though.
    4204     return 1 if $dom && isParent($dbh, $id1, $type1, $dom, 'domain');
    4205     return 1 if $rdns && isParent($dbh, $id1, $type1, $rdns, 'revzone');
     4205    return 1 if $dom && $self->isParent($id1, $type1, $dom, 'domain');
     4206    return 1 if $rdns && $self->isParent($id1, $type1, $rdns, 'revzone');
    42064207    # exit here since we've executed the loop below by proxy in the above recursive calls.
    42074208    return 0;
Note: See TracChangeset for help on using the changeset viewer.