cfmgrv4 init...4
This commit is contained in:
parent
1702158376
commit
e35a278b72
@ -162,11 +162,13 @@ class ZoneService extends CloudflareService
|
||||
public function expire(ZoneEntity $entity): void
|
||||
{
|
||||
$whois = Factory::get()->createWhois();
|
||||
$info = $whois->loadDomainInfo($entity->getTitle());
|
||||
if ($info) {
|
||||
if ($whois->isDomainAvailable($entity->getTitle())) {
|
||||
$info = $whois->loadDomainInfo($entity->getTitle());
|
||||
$expire_date = date("Y-m-d", $info->expirationDate);
|
||||
$this->getModel()->modify($entity, ['expire_date' => $expire_date]);
|
||||
log_message('debug', __FUNCTION__ . " : {$entity->getTitle()} => {$expire_date}");
|
||||
} else {
|
||||
log_message('debug', "{$entity->getTitle()} 이 도메인은 등록되지 않았습니다.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user