- Модуль: webdav
- Путь к файлу: ~/bitrix/modules/webdav/classes/event_log.php
- Класс: CWebDavEventLog
- Вызов: CWebDavEventLog::__call
function __call($name, $arguments)
{
if (isset($this->events[$name]))
{
$eventParams =& $arguments['0'];
$arEvent = $this->events[$name];
$description['ID'] = $eventParams['ELEMENT']['id'];
if ($name == "OnFileRename" || $name == "OnFolderRename")
{
$description["NAME_BEFORE"] = $eventParams['ELEMENT']['name'];
$description['NAME'] = $eventParams['OPERATION']['TO'];
}
else
$description['NAME'] = $eventParams['ELEMENT']['name'];
$description['URL'] = $eventParams['ELEMENT']['url'];
$res = CIBlock::GetByID($this->iblock_id);
if ($arEvent['object'] == 'ELEMENT')
{
if($ar_res = $res->GetNext())
$description['ELEMENT_NAME'] = $ar_res['ELEMENT_NAME'];
$rsIBlock = CIBlockElement::GetList(array(), array("=ID"=>$description['ID']), false, false, array("LIST_PAGE_URL"));
$arIBlock = $rsIBlock->GetNext();
}
else
{
if($ar_res = $res->GetNext())
$description['SECTION_NAME'] = $ar_res['SECTION_NAME'];
$rsIBlock = CIBlockSection::GetList(array(), array("=ID"=>$description['ID']), false, array("LIST_PAGE_URL"));
$arIBlock = $rsIBlock->GetNext();
}
$description ["IBLOCK_PAGE_URL"] = $arIBlock["LIST_PAGE_URL"];
$description['IBLOCK_NAME'] = $ar_res['NAME'];
if ($name == "OnFolderMove" || $name == "OnFileMove")
{
$this->SectionURL = "";
$this->MakeSectionURL($eventParams['OPERATION']['TO']);
$description['MOVE_TO'] = $this->SectionURL;
if ($description['MOVE_TO'] == "")
$description['MOVE_TO'] = $description['IBLOCK_NAME'];
}
$this->Log($arEvent['object'], $arEvent['action'], $this->iblock_id, serialize($description));
}
}