set default time zone and remove success message
This commit is contained in:
parent
44f319460f
commit
f0b9bd2cf2
1 changed files with 6 additions and 2 deletions
|
|
@ -78,6 +78,11 @@ public function mount(Server $server)
|
||||||
$this->timezones = collect(timezone_identifiers_list())->sort()->values()->toArray();
|
$this->timezones = collect(timezone_identifiers_list())->sort()->values()->toArray();
|
||||||
$this->wildcard_domain = $this->server->settings->wildcard_domain;
|
$this->wildcard_domain = $this->server->settings->wildcard_domain;
|
||||||
$this->cleanup_after_percentage = $this->server->settings->cleanup_after_percentage;
|
$this->cleanup_after_percentage = $this->server->settings->cleanup_after_percentage;
|
||||||
|
|
||||||
|
if ($this->server->settings->server_timezone === '') {
|
||||||
|
$defaultTimezone = config('app.timezone');
|
||||||
|
$this->updateServerTimezone($defaultTimezone);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function serverInstalled()
|
public function serverInstalled()
|
||||||
|
|
@ -267,7 +272,6 @@ private function updateServerTimezone($value)
|
||||||
$this->server->settings->server_timezone = $value;
|
$this->server->settings->server_timezone = $value;
|
||||||
$this->server->settings->save();
|
$this->server->settings->save();
|
||||||
|
|
||||||
$this->dispatch('success', "Timezone successfully changed to {$value}.");
|
|
||||||
return true;
|
return true;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->dispatch('error', $e->getMessage());
|
$this->dispatch('error', $e->getMessage());
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue