[Rt-commit] r6523 - in rt/branches/3.7-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Sun Nov 26 17:45:37 EST 2006
Author: ruz
Date: Sun Nov 26 17:45:37 2006
New Revision: 6523
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/lib/RT/CurrentUser.pm
Log:
r4180 at cubic-pc: cubic | 2006-11-27 01:49:41 +0300
r3513 at cubic-pc: cubic | 2006-06-29 06:44:10 +0400
* when we know that we have ID then use LoadById method
* don't copy data in proxy method
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/CurrentUser.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/CurrentUser.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/CurrentUser.pm Sun Nov 26 17:45:37 2006
@@ -140,15 +140,16 @@
my $self = shift;
my $user = RT::User->new( $self );
-
- unless ( $user->Load( $self->Id ) ) {
- $RT::Logger->err($self->loc("Couldn't load [_1] from the users database.\n", $self->Id));
+ unless ( $user->LoadById( $self->Id ) ) {
+ $RT::Logger->error(
+ $self->loc("Couldn't load [_1] from the users database.\n", $self->Id)
+ );
}
return $user;
}
# }}}
-# {{{ sub PrincipalObj
+# {{{ sub PrincipalObj
=head2 PrincipalObj
@@ -157,10 +158,7 @@
=cut
-sub PrincipalObj {
- my $self = shift;
- return($self->UserObj->PrincipalObj);
-}
+sub PrincipalObj { return $_[0]->UserObj->PrincipalObj }
# }}}
More information about the Rt-commit
mailing list