2namespace Bitrix\Landing\Update\Landing;
4use \Bitrix\Landing\Internals\LandingTable;
5use \Bitrix\Landing\Internals\BlockTable;
6use \Bitrix\Landing\Demos;
7use \Bitrix\Landing\Repo;
8use \Bitrix\Main\Update\Stepper;
9use \Bitrix\Main\Config\Option;
27 $lastId = Option::get(
'landing',
'update_landing_app', 0);
39 $res = Demos::getList([
44 while ($row =
$res->fetch())
46 $demos[$row[
'APP_CODE'] .
'.' . $row[
'XML_ID']] = $row;
59 if ($row =
$res->fetch())
79 while ($row =
$res->fetch())
83 $appCode = isset($demos[$row[
'TPL_CODE']][
'APP_CODE'])
84 ? $demos[$row[
'TPL_CODE']][
'APP_CODE']
88 $resBlock = BlockTable::getList([
97 while ($rowBlock = $resBlock->fetch())
99 $appCodeBlock = isset($blocksRepo[$rowBlock[
'CODE']])
100 ? $blocksRepo[$rowBlock[
'CODE']][
'app_code']
102 if ($appCodeBlock != $appCode)
104 $appCodeBlock =
null;
106 $resTmp = BlockTable::update($rowBlock[
'ID'], [
107 'INITIATOR_APP_CODE' => $appCodeBlock
109 $resTmp->isSuccess();
111 unset($resBlock, $rowBlock);
114 $resTmp = LandingTable::update($row[
'ID'], [
115 'INITIATOR_APP_CODE' => $appCode
117 $resTmp->isSuccess();
128 Option::set(
'landing',
'update_landing_app',
$lastId);
133 Option::delete(
'landing',
array(
'name' =>
'update_landing_app'));
static getList(array $params=array())
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)