From 458916b4d838ed63745c8374aa79a44af848f04f Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Sun, 16 Jun 2024 01:48:14 +0300 Subject: [PATCH] Fix to simplify `make_date` calls --- mailboxes/folders-lib.pl | 4 ++-- web-lib-funcs.pl | 2 +- webmin/os-eol-lib.pl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mailboxes/folders-lib.pl b/mailboxes/folders-lib.pl index e3f4629c6..7beb03ee8 100755 --- a/mailboxes/folders-lib.pl +++ b/mailboxes/folders-lib.pl @@ -4412,10 +4412,10 @@ elsif ($line =~ /^END:VEVENT/) { # Try to add local 'when (period)' my $dtstart_local_obj = $event{'_obj_dtstart_local_time'} = - make_date($event{'dtstart_local_timestamp'}, { _ }); + make_date($event{'dtstart_local_timestamp'}, { }); my $dtend_local_obj = $event{'_obj_dtend_local_time'} = - make_date($event{'dtend_local_timestamp'}, { _ }); + make_date($event{'dtend_local_timestamp'}, { }); # Build when local, e.g.: # Tue Jun 04, 2024 04:30 PM – 05:15 # PM (Asia/Nicosia +0300) diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index dac34ca70..80fcf1fd3 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -2176,7 +2176,7 @@ if (!$@ && $] > 5.011) { } # Return fully detailed object - if (%{$opts}) { + if (ref($only)) { # Can we get ago time my $ago; my $ago_secs = time() - $secs; diff --git a/webmin/os-eol-lib.pl b/webmin/os-eol-lib.pl index be669bb49..c75b74142 100755 --- a/webmin/os-eol-lib.pl +++ b/webmin/os-eol-lib.pl @@ -128,7 +128,7 @@ if (!$eol_data->{'_eol_timestamp'}) { &error_stderr("The provided data is not a valid EOL data hash reference"); return undef; } -my $eol_date = &make_date($eol_data->{'_eol_timestamp'}, { '_' => 1 }); +my $eol_date = &make_date($eol_data->{'_eol_timestamp'}, { }); if (ref($eol_date)) { my $eol_in = sub { my $eol_date = shift;