• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/update/googletonewsync.php
  • Класс: BitrixCalendarUpdateGoogleToNewSync
  • Вызов: GoogleToNewSync::deDuplicateSections
private function deDuplicateSections()
{
	global $DB;
	$sql = "SELECT GROUP_CONCAT(link.ID) as ids
		FROM b_calendar_section_connection link
		GROUP BY link.CONNECTION_ID , link.SECTION_ID
		HAVING count(*) > 1
		;";
	$duplicateGroups = $DB->Query($sql);
	while ($row = $duplicateGroups->Fetch())
	{
		$ids = explode(',', $row['ids']);
		$this->processSectionDubles($ids);
	}
}