• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/classes/general/calendar.php
  • Класс: CCalendar
  • Вызов: CCalendar::DeleteSection
static function DeleteSection($id)
{
	if (self::IsExchangeEnabled(self::GetCurUserId()) && self::$type === 'user')
	{
		$oSect = CCalendarSect::GetById($id);
		// For exchange we change only calendar name
		if ($oSect && $oSect['IS_EXCHANGE'] && $oSect['DAV_EXCH_CAL'])
		{
			$exchRes = CDavExchangeCalendar::DoDeleteCalendar($oSect['OWNER_ID'], $oSect['DAV_EXCH_CAL']);
			if ($exchRes !== true)
			{
				return self::CollectExchangeErrors($exchRes);
			}
		}
	}

	GoogleApiPush::stopChannel(GoogleApiPush::getPush(GoogleApiPush::TYPE_SECTION, $id));

	return CCalendarSect::Delete($id);
}