mirror of
https://github.com/webmin/webmin.git
synced 2026-05-04 22:30:33 +01:00
Added check for empty timeservers field
This commit is contained in:
@@ -9,3 +9,5 @@ Command-line options for the hwclock command can now be specified on the Module
|
||||
Added an API for getting and setting the system and hardware times, for calling by other modules.
|
||||
---- Changes since 1.210 ----
|
||||
When the hardware or system time is not editable due to module access control restrictions, the times are now displayed (but cannot be changed).
|
||||
---- Changes since 1.340 ----
|
||||
Added check for empty timeservers field.
|
||||
|
||||
@@ -50,6 +50,7 @@ if( $in{ 'action' } eq $text{ 'action_apply' } )
|
||||
} elsif( $in{ 'action' } eq $text{ 'index_sync' }) {
|
||||
# Sync with a time server
|
||||
$access{'ntp'} || &error($text{'acl_nontp'});
|
||||
$in{'timeserver'} =~ /\S/ || &error($text{'error_etimeserver'});
|
||||
$err = &sync_time($in{'timeserver'}, $in{'hardware'});
|
||||
&error($err) if ($err);
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ error_hw=Can't set the hardware time : $1
|
||||
error_sync=Can't sync with system time : $1
|
||||
error_ediff=Time server different with local time is too large : $1 days
|
||||
error_entp=NTP time synchronization failed : $1
|
||||
error_etimeserver=No time servers to sync with entered
|
||||
|
||||
log_set_date=Set system time to $1
|
||||
log_set_hwclock=Set hardware clock to $1
|
||||
|
||||
Reference in New Issue
Block a user