• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/update/eventwithlocationupdate.php
  • Класс: BitrixCalendarUpdateEventWithLocationUpdate
  • Вызов: EventWithLocationUpdate::getTotalCountIBlock
private function getTotalCountIBlock(): int
{
	global $DB;
	$timestamp = time() - self::TIMESLICE;
	$count = 0;
	$result = $DB->Query("
		SELECT COUNT(*) AS cnt
		FROM b_calendar_event
		WHERE DELETED = 'N' 
	    AND DATE_TO_TS_UTC > " . $timestamp . "
	    AND PARENT_ID = ID
		AND LOCATION LIKE 'ECMR%'"
	);
	if ($res = $result->Fetch())
	{
		$count = (int)$res['cnt'];
	}

	return $count;
}