projects
/
MojoFacets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f8d628
)
fix items with filters
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 25 May 2010 18:18:21 +0000
(20:18 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 25 May 2010 18:18:21 +0000
(20:18 +0200)
one optimization commited too quickly without testing with filters
lib/MojoFacets/Data.pm
patch
|
blob
|
history
diff --git
a/lib/MojoFacets/Data.pm
b/lib/MojoFacets/Data.pm
index
bf150ee
..
ca598a1
100644
(file)
--- a/
lib/MojoFacets/Data.pm
+++ b/
lib/MojoFacets/Data.pm
@@
-450,8
+450,10
@@
sub items {
foreach my $i ( 0 .. $#$sorted ) {
my $pos = $sort_descending ? $sorted->[$i] : $sorted->[ $#$sorted - $i ];
- push @filtered, $pos;
- next if $#filter_names == -1;
+ if ( $#filter_names == -1 ) {
+ push @filtered, $pos;
+ next;
+ }
my $skip = 0;
foreach ( @filter_names ) {