From b5d749f6d2a2f464981e33eab6dcab8957a472cb Mon Sep 17 00:00:00 2001 From: JT Smith Date: Mon, 24 Jul 2006 15:58:02 +0000 Subject: [PATCH] Fixed a cross-Matrix linking problem when you have two or more Matricies on one site with the same category names. --- docs/changelog/7.x.x.txt | 2 ++ lib/WebGUI/Asset/Wobject/Matrix.pm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 05f18730f..1501eab43 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -19,6 +19,8 @@ - fix: Data Form Text Area Box Non-Existent (Wouter van Oijen / ProcoliX) - Added an error message to the FileUrl macro to help users figure out why it doesn't work. + - Fixed a cross-Matrix linking problem when you have two or more Matricies on + one site with the same category names. 7.0.2 diff --git a/lib/WebGUI/Asset/Wobject/Matrix.pm b/lib/WebGUI/Asset/Wobject/Matrix.pm index eeec1f4ed..eb288f996 100644 --- a/lib/WebGUI/Asset/Wobject/Matrix.pm +++ b/lib/WebGUI/Asset/Wobject/Matrix.pm @@ -1187,7 +1187,7 @@ sub www_viewDetail { $var{compares} = $listing->{compares}; $var{clicks} = $listing->{clicks}; my $sth = $self->session->db->read("select a.value, b.name, b.label, b.description, category from Matrix_listingData a left join - Matrix_field b on a.fieldId=b.fieldId where listingId=".$self->session->db->quote($listingId)." order by b.label"); + Matrix_field b on a.fieldId=b.fieldId and b.assetId=? where listingId=? order by b.label",[$self->getId, $listingId]); while (my $data = $sth->hashRef) { $data->{description} =~ s/\n//g; $data->{description} =~ s/\r//g;