• Модуль: webdav
  • Путь к файлу: ~/bitrix/modules/webdav/classes/diskdispatcher.php
  • Класс: CWebDavDiskDispatcher
  • Вызов: CWebDavDiskDispatcher::addElementForDeletingMark
static function addElementForDeletingMark(array $data, $dataDetermineOwner = array(), $isSection = true)
{
	static $cacheDataDetermineOwner = array();

	if(!$isSection && empty($data['IBLOCK_SECTION_ID']))
	{
		return false;
	}

	$hashKey = empty($dataDetermineOwner)? false : md5(serialize($dataDetermineOwner));
	if($hashKey && isset($cacheDataDetermineOwner[$hashKey]))
	{
		list($userIds, $sectionOwnersElement) = $cacheDataDetermineOwner[$hashKey];
	}
	else
	{
		if($isSection)
		{
			$sectionId = $data['ID'];
			$iblockId = $data['IBLOCK_ID'];
		}
		else
		{
			$sectionId = $data['IBLOCK_SECTION_ID'];
			$iblockId = $data['IBLOCK_ID'];
		}

		$sectionOwnersElement = array();
		$userIds = self::getSubscribersOnSection($iblockId, $sectionId);
		foreach ($userIds as $userId)
		{
			$sectionOwnersElement[] = CWebDavIblock::getRootSectionDataForUser($userId);
		}
		unset($userId);

		if($hashKey)
		{
			$cacheDataDetermineOwner[$hashKey] = array($userIds, $sectionOwnersElement);
		}
	}

	if(empty($sectionOwnersElement))
	{
		return false;
	}

	$data['isSection'] = (bool)$isSection;
	$data['ownerData'] = array($userIds, $sectionOwnersElement);
	static::$dataDeletingMark[] = $data;

	return true;
}