• Модуль: webdav
  • Путь к файлу: ~/bitrix/modules/webdav/classes/iblock.php
  • Класс: CWebDavIblock
  • Вызов: CWebDavIblock::OnBeforeIBlockElementDelete
static function OnBeforeIBlockElementDelete($id)
{
	if(!static::needBlockByDisk())
	{
		return true;
	}
	$fields = CIBlockElement::GetList(array(), array('ID' => $id), false, false, array('IBLOCK_ID'))->fetch();
	if(empty($fields['IBLOCK_ID']))
	{
		return true;
	}
	if(CIBlock::GetArrayByID($fields['IBLOCK_ID'], 'IBLOCK_TYPE_ID') === 'library')
	{
		global $APPLICATION;
		$APPLICATION->throwException(GetMessage('WD_BLOCKED_BY_DISK'));
		return false;
	}

}