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,15 +60,8 @@ time - time component formatted as HH:MM:SS
|
||||||
sub process {
|
sub process {
|
||||||
my ( $session, $toTZ, $format, $date, $time ) = @_;
|
my ( $session, $toTZ, $format, $date, $time ) = @_;
|
||||||
|
|
||||||
my $uTZ = 'UTC';
|
my $uTZ = $session->user->profileField("timeZone");
|
||||||
my $uFormat = '%F %T';
|
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;
|
$toTZ ||= $uTZ;
|
||||||
$format ||= $uFormat;
|
$format ||= $uFormat;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue