[prev] [thread] [next] [lurker] [Date index for 2003/03/15]
Update of /cvsroot/siesta/siesta/lib/Siesta/Storage In directory sc8-pr-cvs1:/tmp/cvs-serv20088/lib/Siesta/Storage Modified Files: DBI.pm Log Message: rencapsulate the storage Index: DBI.pm =================================================================== RCS file: /cvsroot/siesta/siesta/lib/Siesta/Storage/DBI.pm,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- DBI.pm 15 Mar 2003 21:43:13 -0000 1.38 +++ DBI.pm 15 Mar 2003 22:11:56 -0000 1.39 @@ -113,18 +113,16 @@ sub get_users { my $self = shift; - return map { Siesta::User->new_from_hash(%$_) } $self->_get_rows( - table => 'users', - columns => \@Siesta::User::fields - ); + $self->_get_rows( + table => 'users', + columns => \@Siesta::User::fields + ); } sub get_lists_of_user { my $self = shift; my $user_id = shift; - $user_id = UNIVERSAL::can( $user_id, 'id' ) ? $user_id->id : $user_id; - grep { $self->member_of_list( $_->id, $user_id ) } $self->get_lists; } @@ -176,8 +174,6 @@ my $self = shift; my $user = shift; - $user = UNIVERSAL::can( $user, 'id' ) ? $user->id : $user; - return $self->_dbh->do(qq{DELETE FROM users WHERE id = '$user'}); } @@ -211,8 +207,6 @@ sub delete_list { my $self = shift; my $list = shift; - - $list = UNIVERSAL::can( $list, 'id' ) ? $list->id : $list; return $self->_dbh->do(qq{DELETE FROM lists WHERE id = '$list'}); }
Generated at 13:57 on 01 Jul 2004 by mariachi 0.52