--- nfo/perl/libs/Data/Storage/Handler/Tangram.pm 2004/08/31 14:26:08 1.47 +++ nfo/perl/libs/Data/Storage/Handler/Tangram.pm 2004/10/28 11:35:51 1.48 @@ -1,8 +1,11 @@ ############################################ # -# $Id: Tangram.pm,v 1.47 2004/08/31 14:26:08 jonen Exp $ +# $Id: Tangram.pm,v 1.48 2004/10/28 11:35:51 jonen Exp $ # # $Log: Tangram.pm,v $ +# Revision 1.48 2004/10/28 11:35:51 jonen +# + bugfix related to select-criterias(filter) +# # Revision 1.47 2004/08/31 14:26:08 jonen # updated # @@ -724,13 +727,20 @@ } elsif (my $guid = $query->{options}->{GUID}) { $type = 'TRANSPARENT'; - $query->{criterias} = [ { key => 'guid', op => 'eq', val => $guid } ]; - + if(ref($query->{criterias}) eq 'ARRAY') { + push @{$query->{criterias}}, { key => 'guid', op => 'eq', val => $guid }; + } else { + $query->{criterias} = [ { key => 'guid', op => 'eq', val => $guid } ]; + } + } # if operator is different (dispatcher for 'getListFiltered') - } elsif (my $op = $query->{options}->{op}) { + if (my $op = $query->{options}->{op}) { $type = 'TRANSPARENT'; - $query->{criterias} = [ { key => $query->{options}->{meta_label}, op => $op, val => $query->{options}->{meta_value} } ]; - + if(ref($query->{criterias}) eq 'ARRAY') { + push @{$query->{criterias}}, { key => $query->{options}->{meta_label}, op => $op, val => $query->{options}->{meta_value} }; + } else { + $query->{criterias} = [ { key => $query->{options}->{meta_label}, op => $op, val => $query->{options}->{meta_value} } ]; + } } # HACK: special case: querying by id does not translate into a common tangram query