• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/classes/general/calendar_sect.php
  • Класс: CCalendarSect
  • Вызов: CCalendarSect::GetCalDAVConnectionId
static function GetCalDAVConnectionId($section = 0)
{
	global $DB;

	$arIds = is_array($section) ? $section : array($section);
	$arIds = array_unique($arIds);
	$strIds = [];
	$result = [];
	foreach($arIds as $id)
	{
		if ((int)$id > 0)
		{
			$strIds[] = (int)$id;
			$result[(int)$id] = 0;
		}
	}
	$strIds = implode(',', $strIds);

	$strSql = "SELECT ID, CAL_DAV_CON FROM b_calendar_section WHERE ID in (".$strIds.")";
	$res = $DB->Query($strSql, false, "File: ".__FILE__."
Line: ".__LINE__); while ($arRes = $res->Fetch()) { $result[$arRes['ID']] = ($arRes['CAL_DAV_CON'] > 0) ? (int)$arRes['CAL_DAV_CON'] : 0; } if (!is_array($section)) { return $result[$section]; } return $result; }