Changeset 152 for trunk


Ignore:
Timestamp:
10/21/11 17:59:01 (13 years ago)
Author:
Kris Deugau
Message:

/trunk

Tweaks and fixes in getParents() and isParent()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r135 r152  
    14571457    my $result = $dbh->selectrow_hashref("SELECT $par_col{$type} FROM $par_tbl{$type} WHERE $id_col{$type} = ?",
    14581458        undef, ($id) );
    1459     unshift @parlist, ($result->{$par_col{$type}} => $par_type{$type});
     1459    my %tmp = ($result->{$par_col{$type}} => $par_type{$type});
     1460    unshift @parlist, \%tmp;
    14601461    last if $result->{$par_col{$type}} == 1;    # group 1 is its own parent
     1462    $id = $result->{$par_col{$type}};
    14611463    $type = $par_type{$type};
    1462     $id = $result->{$par_col{$type}};
    14631464  }
    14641465
     
    15021503    # group 1 is its own parent.  need this here more to break strange loops than for detecting a parent
    15031504    last if $result->{$par_col{$type}} == 1;
     1505    $id = $result->{$par_col{$type}};
    15041506    $type = $par_type{$type};
    1505     $id = $result->{$par_col{$type}};
    15061507last if $tmp++ > 10;
    15071508  }
Note: See TracChangeset for help on using the changeset viewer.