27 $lastId = Option::get(
'landing',
'update_domain_check', 0);
29 if (!isset($result[
'steps']))
36 $resDomain = \Bitrix\Landing\Domain::getList([
44 while ($domain = $resDomain->fetch())
46 $resSite = \Bitrix\Landing\Site::getList([
51 'DOMAIN_ID' => $domain[
'ID'],
52 'CHECK_PERMISSIONS' =>
'N'
55 if (!$resSite->fetch())
58 if ($domain[
'ID'] > $lastId)
60 if (count($forUpdate) < self::STEPPER_COUNT)
62 $forUpdate[$domain[
'ID']] = $domain[
'DOMAIN'];
68 if (!empty($forUpdate))
70 $class = \Bitrix\Landing\Manager::getExternalSiteController();
71 foreach ($forUpdate as $id => $domain)
75 \Bitrix\Landing\Domain::delete($id);
76 $class::deleteDomain($domain);
78 Option::set(
'landing',
'update_domain_check', $lastId);
83 Option::delete(
'landing', array(
'name' =>
'update_domain_check'));