• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/landing.php
  • Класс: BitrixLandingLanding
  • Вызов: Landing::updateVersion
public function updateVersion()
{
	$needUpdate = false;
	// double hooks: public and draft
	if ($this->version <= 1)
	{
		$needUpdate = true;
		$this->version = 2;
		$hookEditMode = Hook::getEditMode();
		if (!$hookEditMode)
		{
			Hook::setEditMode(true);
		}
		Hook::publicationSite($this->siteId);
		Hook::publicationLanding($this->id);
		if (!$hookEditMode)
		{
			Hook::setEditMode(false);
		}
	}
	// block assets
	if ($this->version <= 2)
	{
		$needUpdate = true;
		$this->version = 3;
		AssetsPreProcessingIcon::processingLanding($this->id);
		AssetsManager::rebuildWebpackForLanding($this->id);
	}
	if ($this->version <= 3)
	{
		$needUpdate = true;
		$this->version = 4;
		AssetsPreProcessingFont::processingLanding($this->id);
	}
	if ($this->version <= 4)
	{
		$needUpdate = true;
		$this->version = 5;
		HookPageThemeFonts::migrateFromTypoThemes($this->id, $this->siteId);
	}
	if ($this->version <= 5)
	{
		// fix 126641
		$needUpdate = true;
		$this->version = 6;
		AssetsPreProcessingIcon::processingLanding($this->id);
		AssetsManager::rebuildWebpackForLanding($this->id);
	}
	if ($this->version <= 6)
	{
		$needUpdate = true;
		UpdateBlockButtons::updateLanding($this->id);
		UpdateBlockFontWeight::updateLanding($this->id);
		$this->version = 7;
	}
	if ($this->version <= 7)
	{
		$needUpdate = true;
		AssetsPreProcessingIcon::processingLanding($this->id);
		AssetsManager::rebuildWebpackForLanding($this->id);
		$this->version = 8;
	}
	if ($this->version <= 9)
	{
		// +1 version for reupdate in hotfix
		$needUpdate = true;
		SubtypeForm::updateLandingToEmbedForms($this->id);
		AssetsManager::rebuildWebpackForLanding($this->id);
		$this->version = 10;
	}
	if ($this->version <= 10)
	{
		$needUpdate = true;
		UpdateBlockDuplicateImages::updateLanding($this->id);

		$this->version = 11;
	}
	if ($needUpdate)
	{
		Rights::setOff();
		self::update($this->id, [
			'VERSION' => $this->version,
			'DATE_MODIFY' => false,
			'MODIFIED_BY_ID' => false
		]);
		Rights::setOn();
	}
}