fix: conditions to update a domain name

This commit is contained in:
Maël Gangloff
2024-12-07 20:18:49 +01:00
parent fbcecff982
commit 303d73e65e

View File

@@ -368,12 +368,11 @@ class Domain
{ {
return $this->getUpdatedAt() return $this->getUpdatedAt()
->diff(new \DateTimeImmutable())->days >= 7 ->diff(new \DateTimeImmutable())->days >= 7
|| ( || (($fromUser || ($this->getUpdatedAt()
($fromUser || ($this->getUpdatedAt() ->diff(new \DateTimeImmutable())->h * 60 + $this->getUpdatedAt()
->diff(new \DateTimeImmutable())->h * 60 + $this->getUpdatedAt() ->diff(new \DateTimeImmutable())->i) >= 50)
->diff(new \DateTimeImmutable())->i) >= 50) && $this->isToBeWatchClosely())
&& $this->isToBeWatchClosely()
)
|| (count(array_intersect($this->getStatus(), ['auto renew period', 'client hold', 'server hold'])) > 0 || (count(array_intersect($this->getStatus(), ['auto renew period', 'client hold', 'server hold'])) > 0
&& $this->getUpdatedAt()->diff(new \DateTimeImmutable())->days >= 1); && $this->getUpdatedAt()->diff(new \DateTimeImmutable())->days >= 1);
} }