- # type
- $sth=$dbh->prepare("select * from auth_types where authtypecode=?");
- $sth->execute($authtypecode);
- } else {
- $sth=$dbh->prepare("select * from auth_types");
- $sth->execute;
- }
- my $res=$sth->fetchall_arrayref({});
- if (scalar(@$res)==1){
- return $res->[0];
- } else {
- return $res;
+ # type (FIXME but why?)
+ $sth=$dbh->prepare("select * from auth_types where authtypecode=?");
+ $sth->execute($authtypecode);
+ if (my $res = $sth->fetchrow_hashref) {
+ return $res;
+ }