From: soufiane Date: Thu, 25 Jul 2024 14:32:35 +0000 (+0200) Subject: wait #7008 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=a8590c4102ac721b7c3c96e017bebed72ede7ece;p=cubist_net.git wait #7008 --- diff --git a/src/Transfer/Local.php b/src/Transfer/Local.php index bba6fdc..40e2625 100644 --- a/src/Transfer/Local.php +++ b/src/Transfer/Local.php @@ -10,6 +10,8 @@ class Local extends Driver const ERROR_FOLDER_UNMOUNT = 3; + const ERROR_SUBDOMAIN_DNS = 6; + public function __construct(IServer $server, $rootPath = null) { parent::__construct($server); @@ -72,6 +74,27 @@ class Local extends Driver } public function checkConnexion($data = []) { + $ipHosting = $data['protocol'] === 'hosting' ? gethostbyname('hosting.fluidbook.com') : gethostbyname('hosting2.fluidbook.com'); + + $subdomains = explode("\r\n",$data['subdomains']); + $subdomainsIntruder = []; + + if($subdomains) { + foreach($subdomains as $subdomain) { + $ipSubdomain = gethostbyname($subdomain); + if($ipSubdomain === $ipHosting) { + continue; + }else { + $subdomainsIntruder[] = $subdomain; + } + } + } + + if($subdomainsIntruder) { + $subdomainsList = implode(", ",$subdomainsIntruder); + return ['subdomains' => $subdomainsList]; + } + if(file_exists($this->getRootPath().'status')) { return true; } else {