mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 22:21:42 +00:00
Optimise code.
This commit is contained in:
@@ -57,9 +57,9 @@ class NewIPAddressWarningMail extends Mailable
|
||||
// time
|
||||
$this->time = now()->formatLocalized((string)trans('config.date_time'));
|
||||
$this->host = '';
|
||||
$host = gethostbyaddr($this->ipAddress);
|
||||
if($host !== $this->ipAddress) {
|
||||
$this->host = $host;
|
||||
$hostName = gethostbyaddr($this->ipAddress);
|
||||
if($hostName !== $this->ipAddress) {
|
||||
$this->host = $hostName;
|
||||
}
|
||||
|
||||
return $this->view('emails.new-ip-html')->text('emails.new-ip-text')
|
||||
|
||||
Reference in New Issue
Block a user