Bug 20444: Remove sub GetAttributes
[koha.git] / C4 / Members / Attributes.pm
index 1036e58..cf9051d 100644 (file)
@@ -95,24 +95,6 @@ sub GetBorrowerAttributes {
     return \@results;
 }
 
-=head2 GetAttributes
-
-  my $attributes = C4::Members::Attributes::GetAttributes([$opac_only]);
-
-Retrieve an arrayref of extended attribute codes
-
-=cut
-
-sub GetAttributes {
-    my ($opac_only) = @_;
-
-    my $dbh = C4::Context->dbh();
-    my $query = "SELECT code FROM borrower_attribute_types";
-    $query .= "\nWHERE opac_display = 1" if $opac_only;
-    $query .= "\nORDER BY code";
-    return $dbh->selectcol_arrayref($query);
-}
-
 =head2 GetBorrowerAttributeValue
 
   my $value = C4::Members::Attributes::GetBorrowerAttributeValue($borrowernumber, $attribute_code);
@@ -254,7 +236,7 @@ sub DeleteBorrowerAttributes {
     $query .= $branch_limit
         ? q{
             LEFT JOIN borrower_attribute_types_branches ON bat_code = code
-            WHERE b_branchcode = ? OR b_branchcode IS NULL
+            WHERE ( b_branchcode = ? OR b_branchcode IS NULL )
                 AND borrowernumber = ?
         }
         : q{
@@ -271,6 +253,7 @@ sub DeleteBorrowerAttributes {
 Delete a borrower attribute for the patron identified by C<$borrowernumber> and the attribute code of C<$attribute>
 
 =cut
+
 sub DeleteBorrowerAttribute {
     my ( $borrowernumber, $attribute ) = @_;
 
@@ -290,6 +273,7 @@ sub DeleteBorrowerAttribute {
 Update a borrower attribute C<$attribute> for the patron identified by C<$borrowernumber>,
 
 =cut
+
 sub UpdateBorrowerAttribute {
     my ( $borrowernumber, $attribute ) = @_;