• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/internals/counter/counterprocessor.php
  • Класс: BitrixTasksInternalsCounterCounterProcessor
  • Вызов: CounterProcessor::reset
private function reset(array $types, array $tasksIds = [], array $groupIds = []): void
{
	$where = "AND `TYPE` IN ('". implode("','", $types) ."')";

	if (!empty($tasksIds))
	{
		$where .= " AND TASK_ID IN (". implode(",", $tasksIds) .")";
	}

	if (!empty($groupIds))
	{
		$where .= " AND GROUP_ID IN (". implode(",", $groupIds) .")";
	}

	$sql = "
		DELETE
		FROM ". CounterTable::getTableName(). "
		WHERE
			`USER_ID` = {$this->userId}
			{$where}
	";

	Application::getConnection()->query($sql);
}