Lines 82-88
sub all {
Link Here
|
82 |
for ( @{$dbh->selectall_arrayref( |
82 |
for ( @{$dbh->selectall_arrayref( |
83 |
"SELECT * FROM itemtypes ORDER BY description", { Slice => {} })} ) |
83 |
"SELECT * FROM itemtypes ORDER BY description", { Slice => {} })} ) |
84 |
{ |
84 |
{ |
85 |
$_->{description} = Encode::encode('UTF-8', $_->{description}); |
|
|
86 |
push @itypes, $class->new($_); |
85 |
push @itypes, $class->new($_); |
87 |
} |
86 |
} |
88 |
return @itypes; |
87 |
return @itypes; |
Lines 105-113
sub get {
Link Here
|
105 |
my $data = $dbh->selectrow_hashref( |
104 |
my $data = $dbh->selectrow_hashref( |
106 |
"SELECT * FROM itemtypes WHERE itemtype = ?", undef, $itemtype |
105 |
"SELECT * FROM itemtypes WHERE itemtype = ?", undef, $itemtype |
107 |
); |
106 |
); |
108 |
if ( $data->{description} ) { |
|
|
109 |
$data->{description} = Encode::encode('UTF-8', $data->{description}); |
110 |
} |
111 |
return $class->new($data); |
107 |
return $class->new($data); |
112 |
} |
108 |
} |
113 |
|
109 |
|