mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
fix: calculateDaysFromStatus
This commit is contained in:
@@ -486,10 +486,16 @@ class Domain
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_array('pending delete', $lastStatus->getAddStatus()) && !$this->isRedemptionPeriod()) {
|
if ($this->isPendingDelete() && (
|
||||||
|
in_array('pending delete', $lastStatus->getAddStatus())
|
||||||
|
|| in_array('redemption period', $lastStatus->getDeleteStatus()))
|
||||||
|
) {
|
||||||
return self::daysBetween($now, $lastStatus->getCreatedAt()->add(new \DateInterval('P'. 5 .'D')));
|
return self::daysBetween($now, $lastStatus->getCreatedAt()->add(new \DateInterval('P'. 5 .'D')));
|
||||||
}
|
}
|
||||||
if (in_array('redemption period', $lastStatus->getAddStatus())) {
|
|
||||||
|
if ($this->isRedemptionPeriod()
|
||||||
|
&& in_array('redemption period', $lastStatus->getAddStatus())
|
||||||
|
) {
|
||||||
return self::daysBetween($now, $lastStatus->getCreatedAt()->add(new \DateInterval('P'.(30 + 5).'D')));
|
return self::daysBetween($now, $lastStatus->getCreatedAt()->add(new \DateInterval('P'.(30 + 5).'D')));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user