- Модуль: webdav
- Путь к файлу: ~/bitrix/modules/webdav/classes/iblocksocnetevent.php
- Класс: CWebDavSocNetEvent
- Вызов: CWebDavSocNetEvent::SocNetGroupRename
public function SocNetGroupRename($id, $arParams)
{
if ($this->IBlockID == null)
return;
if (! (isset($arParams['NAME']) && $arParams['NAME'] <> ''))
return;
$arGroup = CSocNetGroup::GetByID($id);
$sOldName = GetMessage('SONET_GROUP_PREFIX').$arGroup['NAME'];
$sNewName = GetMessage('SONET_GROUP_PREFIX').$arParams['NAME'];
if($sOldName === $sNewName)
{
return;
}
$arFilter = array(
"IBLOCK_ID" => $this->IBlockID,
"SOCNET_GROUP_ID" => intval($id),
);
$se = new CIBlockSection;
$dbSection = $se->GetList(array(), $arFilter, false, array('ID'));
if ($arGroupSection = $dbSection->Fetch())
{
$sectionID = $arGroupSection['ID'];
$se->Update($sectionID, array("NAME" => $sNewName));
$GLOBALS["CACHE_MANAGER"]->ClearByTag("webdav_aggregator");
}
}