View | Details | Raw Unified | Return to bug 8196
Collapse All | Expand All

(-)a/C4/Members/Attributes.pm (-4 / +2 lines)
Lines 77-88 sub GetBorrowerAttributes { Link Here
77
                 FROM borrower_attributes
77
                 FROM borrower_attributes
78
                 JOIN borrower_attribute_types USING (code)
78
                 JOIN borrower_attribute_types USING (code)
79
                 LEFT JOIN authorised_values ON (category = authorised_value_category AND attribute = authorised_value)
79
                 LEFT JOIN authorised_values ON (category = authorised_value_category AND attribute = authorised_value)
80
                 WHERE 1";
80
                 WHERE borrowernumber = ?";
81
    $query .= "\nAND borrowernumber = ?" if $borrowernumber;
82
    $query .= "\nAND opac_display = 1" if $opac_only;
81
    $query .= "\nAND opac_display = 1" if $opac_only;
83
    $query .= "\nORDER BY code, attribute";
82
    $query .= "\nORDER BY code, attribute";
84
    my $sth = $dbh->prepare_cached($query);
83
    my $sth = $dbh->prepare_cached($query);
85
    $sth->execute($borrowernumber ? $borrowernumber : ());
84
    $sth->execute($borrowernumber);
86
    my @results = ();
85
    my @results = ();
87
    while (my $row = $sth->fetchrow_hashref()) {
86
    while (my $row = $sth->fetchrow_hashref()) {
88
        push @results, {
87
        push @results, {
89
- 

Return to bug 8196