[Jifty-commit] r6045 - jifty/trunk/lib/Jifty/Plugin/SkeletonApp
Jifty commits
jifty-commit at lists.jifty.org
Mon Dec 1 00:25:17 EST 2008
Author: ruz
Date: Mon Dec 1 00:25:16 2008
New Revision: 6045
Modified:
jifty/trunk/lib/Jifty/Plugin/SkeletonApp/View.pm
Log:
* 3 calls to Jifty->web->current_user in 5 lines don't add readability
Modified: jifty/trunk/lib/Jifty/Plugin/SkeletonApp/View.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/SkeletonApp/View.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/SkeletonApp/View.pm Mon Dec 1 00:25:16 2008
@@ -23,12 +23,11 @@
=cut
private template 'salutation' => sub {
+ my $cu = Jifty->web->current_user;
div {
attr {id => "salutation" };
- if ( Jifty->web->current_user->id
- and Jifty->web->current_user->user_object )
- {
- _( 'Hiya, %1.', Jifty->web->current_user->username );
+ if ( $cu->id and $cu->user_object ) {
+ _( 'Hiya, %1.', $cu->username );
}
else {
_("You're not currently signed in.");
More information about the Jifty-commit
mailing list