From: Chris W. <la...@us...> - 2004-12-05 08:52:00
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/base_security/OpenInteract2/Action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16278/pkg/base_security/OpenInteract2/Action Modified Files: Security.pm Log Message: update packages to move as many messages as possible out of code and into message files; use new add_status/add_error shortcuts Index: Security.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_security/OpenInteract2/Action/Security.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Security.pm 27 Sep 2004 03:25:22 -0000 1.13 --- Security.pm 5 Dec 2004 08:51:19 -0000 1.14 *************** *** 223,227 **** $log->error( "Error fetching security for [$object_class: ", "$object_id]: $@" ); ! $self->param_add( error_msg => "Cannot fetch security: $@" ); return $self->execute({ task => 'display_error_fetch' }); } --- 223,227 ---- $log->error( "Error fetching security for [$object_class: ", "$object_id]: $@" ); ! $self->add_error_key( 'base_security.error.failed_fetch', $@ ); return $self->execute({ task => 'display_error_fetch' }); } *************** *** 380,389 **** eval { $SECURE_CLASS->$method( \%security_params ) }; if ( $@ ) { ! $self->param_add( ! error_msg => "Failed to $action security for $identifier $@" ); } else { ! $self->param_add( ! status_msg => "Successful $action security for $identifier" ); } } --- 380,389 ---- eval { $SECURE_CLASS->$method( \%security_params ) }; if ( $@ ) { ! $self->add_error_key( 'base_security.error.generic', ! $action, $identifier, $@ ); } else { ! $self->add_status_key( 'base_security.status.generic', ! $action, $identifier ); } } *************** *** 427,437 **** eval { $s->remove }; if ( $@ ) { ! $self->param_add( ! error_msg => "Failed to remove security for " . ! "$item_o scope $item_s: $@ " ); } else { ! $self->param_add( ! status_msg => "Removed security for $item_o scope $item_s ok" ); } } --- 427,436 ---- eval { $s->remove }; if ( $@ ) { ! $self->add_error_key( 'base_security.error.generic', ! 'remove', "$item_o scope $item_s", $@ ); } else { ! $self->add_status_key( 'base_security.status.remove', ! $item_o, $item_s ); } } *************** *** 451,455 **** if ( $@ ) { $log->error( "Failed to fetch groups: $@" ); ! $self->param_add( error_msg => "Failed to fetch all groups: $@" ); $group_list = []; } --- 450,454 ---- if ( $@ ) { $log->error( "Failed to fetch groups: $@" ); ! $self->add_error_key( 'base_security.error.fetch', $@ ); $group_list = []; } *************** *** 478,482 **** if ( $@ ) { $log->error( "Failed to fetch users: $@" ); ! $self->param_add( error_msg => "Failed to fetch all users: $@" ); $user_list = []; } --- 477,481 ---- if ( $@ ) { $log->error( "Failed to fetch users: $@" ); ! $self->add_error_key( 'base_security.error.fetch_users', $@ ); $user_list = []; } |