Remove unneeded checks for session user existance.
This commit is contained in:
parent
16a2057b5b
commit
ddf3fa108f
1 changed files with 2 additions and 9 deletions
|
|
@ -60,16 +60,9 @@ time - time component formatted as HH:MM:SS
|
|||
sub process {
|
||||
my ( $session, $toTZ, $format, $date, $time ) = @_;
|
||||
|
||||
my $uTZ = 'UTC';
|
||||
my $uFormat = '%F %T';
|
||||
my $uTZ = $session->user->profileField("timeZone");
|
||||
my $uFormat = $session->user->profileField("dateFormat");
|
||||
|
||||
# Change defaults only if we have a user defined and they have these set.
|
||||
eval { $session->user };
|
||||
unless ($@) {
|
||||
$uTZ = $session->user->profileField("timeZone");
|
||||
$uFormat = $session->user->profileField("dateFormat");
|
||||
}
|
||||
|
||||
$toTZ ||= $uTZ;
|
||||
$format ||= $uFormat;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue