• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/site.php
  • Класс: BitrixLandingSite
  • Вызов: Site::onBeforeMainSiteDelete
static function onBeforeMainSiteDelete($siteId)
{
	$res = Landing::getList(array(
		'select' => array(
			'ID'
		),
		'filter' => array(
			'=SITE.SMN_SITE_ID' => $siteId,
			'CHECK_PERMISSIONS' => 'N'
		)
	));

	if ($res->fetch())
	{
		Manager::getApplication()->throwException(
			Loc::getMessage('LANDING_CLB_ERROR_DELETE_SMN'),
			'ERROR_DELETE_SMN'
		);
		return false;
	}

	return true;
}