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