34 $lastId = Option::get(
'landing', self::OPTION_CODE, 0);
35 $scopes = Option::get(
'landing', self::OPTION_CODE_SCOPES,
'');
36 $scopes = unserialize($scopes, [
'allowed_classes' =>
false]);
39 \Bitrix\Landing\Rights::setGlobalOff();
41 if (!isset($result[
'steps']))
46 if (!is_array($scopes))
51 if (isset($scopes[0]))
53 \Bitrix\Landing\Site\Type::clearScope();
54 \Bitrix\Landing\Site\Type::setScope($scopes[0]);
65 '=DELETED' => [
'Y',
'N'],
66 '=SITE.DELETED' => [
'Y',
'N']
69 if ($row = $res->fetch())
71 $result[
'count'] = $row[
'CNT'];
78 'SITE_TYPE' =>
'SITE.TYPE'
82 '=DELETED' => [
'Y',
'N'],
83 '=SITE.DELETED' => [
'Y',
'N']
90 while ($row = $res->fetch())
96 \Bitrix\Landing\Hook::indexLanding(
101 if ($finished && $scopes)
103 array_shift($scopes);
108 $result[
'steps'] = 0;
112 \Bitrix\Landing\Rights::setGlobalOn();
116 $scopes = array_values($scopes);
117 Option::set(
'landing', self::OPTION_CODE, $lastId);
118 Option::set(
'landing', self::OPTION_CODE_SCOPES, serialize($scopes));
123 Option::delete(
'landing', [
'name' => self::OPTION_CODE]);
124 Option::delete(
'landing', [
'name' => self::OPTION_CODE_SCOPES]);