Bug 7807: [SIGNED-OFF] Fix call to GetSuggestionFromBiblionumber
[koha_gimpoz] / C4 / Category.pm
index 6b503b8..8536128 100644 (file)
@@ -71,13 +71,12 @@ C<description>.
 =cut
 
 sub all {
-    my ($class) = @_;
-    my $dbh = C4::Context->dbh;
-    return    map { $class->new($_) }    @{$dbh->selectall_arrayref(
-        # The categories table is small enough for
-        # `SELECT *` to be harmless.
-        "SELECT * FROM categories ORDER BY description",
-        { Slice => {} },
+    my $class = shift;
+    map {
+        utf8::encode($_->{description});
+        $class->new($_);
+    } @{C4::Context->dbh->selectall_arrayref(
+        "SELECT * FROM categories ORDER BY description", { Slice => {} }
     )};
 }
 
@@ -90,26 +89,48 @@ These are read-only accessors for attributes of a C4::Category object.
 
 =head3 $category->categorycode
 
+=cut
+
 =head3 $category->description
 
+=cut
+
 =head3 $category->enrolmentperiod
 
+=cut
+
 =head3 $category->upperagelimit
 
+=cut
+
 =head3 $category->dateofbirthrequired
 
+=cut
+
 =head3 $category->finetype
 
+=cut
+
 =head3 $category->bulk
 
+=cut
+
 =head3 $category->enrolmentfee
 
+=cut
+
 =head3 $category->overduenoticerequired
 
+=cut
+
 =head3 $category->issuelimit
 
+=cut
+
 =head3 $category->reservefee
 
+=cut
+
 =head3 $category->category_type
 
 =cut
@@ -144,14 +165,3 @@ John Beppu <john.beppu@liblime.com>
 =cut
 
 1;
-
-# Local Variables: ***
-# mode: cperl ***
-# indent-tabs-mode: nil ***
-# cperl-close-paren-offset: -4 ***
-# cperl-continued-statement-offset: 4 ***
-# cperl-indent-level: 4 ***
-# cperl-indent-parens-as-block: t ***
-# cperl-tab-always-indent: nil ***
-# End: ***
-# vim:tabstop=8 softtabstop=4 shiftwidth=4 shiftround expandtab