Fixed a cross-Matrix linking problem when you have two or more Matricies on

one site with the same category names.
This commit is contained in:
JT Smith 2006-07-24 15:58:02 +00:00
parent 63972bab6d
commit b5d749f6d2
2 changed files with 3 additions and 1 deletions

View file

@ -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;