From b76ab0ec66e30e5935a0b8172d91969e0e2695b4 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 6 Jun 2012 12:56:56 +0200 Subject: [PATCH] Bug 8196: FIX for Bug 5742: All extended attributes are shown when editing a patron Test scenario: 1. make sure that you have ExtendedPatronAttributes enabled 2. open /cgi-bin/koha/members/memberentry.pl?op=add;categorycode=S0 (you might need to modify categorycode according to your local config) 3. verify that you get all extended patron attributes in form Signed-off-by: Dobrica Pavlinusic Signed-off-by: Paul Poulain --- C4/Members/Attributes.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/C4/Members/Attributes.pm b/C4/Members/Attributes.pm index b373c94194..cde25d14d9 100644 --- a/C4/Members/Attributes.pm +++ b/C4/Members/Attributes.pm @@ -77,12 +77,11 @@ sub GetBorrowerAttributes { FROM borrower_attributes JOIN borrower_attribute_types USING (code) LEFT JOIN authorised_values ON (category = authorised_value_category AND attribute = authorised_value) - WHERE 1"; - $query .= "\nAND borrowernumber = ?" if $borrowernumber; + WHERE borrowernumber = ?"; $query .= "\nAND opac_display = 1" if $opac_only; $query .= "\nORDER BY code, attribute"; my $sth = $dbh->prepare_cached($query); - $sth->execute($borrowernumber ? $borrowernumber : ()); + $sth->execute($borrowernumber); my @results = (); while (my $row = $sth->fetchrow_hashref()) { push @results, { -- 2.39.5