• Модуль: dav
  • Путь к файлу: ~/bitrix/modules/dav/classes/general/groupdavclientcalendar.php
  • Класс: CDavGroupdavClientCalendar
  • Вызов: CDavGroupdavClientCalendar::GetCalendarModificationLabel
public function GetCalendarModificationLabel($path = '/')
{
	$this->ClearErrors();

	$this->Connect();

	$result = $this->Propfind(
		$path,
		array(
			array("getctag", "http://calendarserver.org/ns/")
		),
		null,
		0
	);

	$this->Disconnect();

	if (is_null($result) || $this->getError())
	{
		return null;
	}

	$xmlDoc = $result->GetBodyXml();

	$getctag = null;

	$arPropstat = $xmlDoc->GetPath("/*/response/propstat");
	foreach ($arPropstat as $propstat)
	{
		$arStatus = $propstat->GetPath("/propstat/status");
		if (!empty($arStatus) && preg_match("#s200s+OK#i", $arStatus[0]->GetContent()))
		{
			$arGetCTag = $propstat->GetPath("/propstat/prop/getctag");
			if (!empty($arGetCTag))
			{
				$getctag = $arGetCTag[0]->GetContent();
			}
		}
	}

	return $getctag;
}