X-Git-Url: http://erislabs.net/gitweb/?p=id3fs.git;a=blobdiff_plain;f=lib%2FID3FS%2FPath%2FNode.pm;h=dd650e4a1af36ff818fac97d1308f9e326fc0a9a;hp=681a66cfc911eb965eaf7eaf384a721d7346bfc4;hb=93f961269b57f705256c29a2a29d15212388f427;hpb=db517cc1ff37f50a636a89f6adaba51552bbccb1 diff --git a/lib/ID3FS/Path/Node.pm b/lib/ID3FS/Path/Node.pm index 681a66c..dd650e4 100644 --- a/lib/ID3FS/Path/Node.pm +++ b/lib/ID3FS/Path/Node.pm @@ -128,21 +128,11 @@ sub node_to_sql return $node->to_sql($hasvals, $not, @joins) if($node->type() eq "boolean"); my $sql; my $cnt=scalar(@joins)+1; - if(defined($node->{parents_id})) - { - $sql= "(t" . scalar(@joins) . ".parents_id='$node->{parents_id}'"; - $sql .= " AND t" . scalar(@joins) . ".id='" . $node->{id} . "'"; - } - else - { - $sql= "(t" . scalar(@joins) .".parents_id=''"; - $sql .= " AND t" . scalar(@joins) . ".id='" . $node->{id} . "'"; - } + $sql .= "t" . scalar(@joins) . ".id='" . $node->{id} . "'"; if($not && !$hasvals) { $sql .= " AND fxt" . scalar(@joins) . ".files_id IS NULL"; } - $sql .= ")"; return ($sql, ()); } @@ -156,10 +146,6 @@ sub used_tags push(@used, $self->right()->used_tags()) if($self->right()); return(grep { defined; } @used); } - elsif($self->parents_id()) - { - return([ $self->parents_id(), $self->id() ]); - } return $self->id(); }