From a6bb64613e3bd71b7f7e11d377e5170698b17a1f Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 13 Aug 2009 05:54:12 +0000 Subject: [PATCH] When the matrix displays search results, only show those that match. Previously, it displayed all the products, with those that matched having checked boxes. --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Asset/Wobject/Matrix.pm | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 870796ef4..1496db444 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,4 +1,5 @@ 7.7.17 + - fixed #10765: Matrix displays all products when searching - fixed #10764: Matrix i18n: hitting compare button says I have 1 item selected. - fixed #10763: Matrix: Search button doesn't work. - fixed #10761: Two i18n issues on LDAP page diff --git a/lib/WebGUI/Asset/Wobject/Matrix.pm b/lib/WebGUI/Asset/Wobject/Matrix.pm index 322a2feb4..2538539a3 100644 --- a/lib/WebGUI/Asset/Wobject/Matrix.pm +++ b/lib/WebGUI/Asset/Wobject/Matrix.pm @@ -1172,7 +1172,7 @@ sub www_getCompareFormData { my @results; if($form->process("search")){ if ($searchParamList){ - foreach my $result (@{$self->getListings}) { + RESULT: foreach my $result (@{$self->getListings}) { my $matrixListing_attributes = $session->db->buildHashRefOfHashRefs(" select value, fieldType, attributeId from Matrix_attribute left join MatrixListing_attribute as listing using(attributeId) @@ -1195,7 +1195,7 @@ sub www_getCompareFormData { } } $result->{assetId} =~ s/-/_____/g; - push @results, $result; + push @results, $result if $result->{checked} eq 'checked'; } } else{