TaskAttachmentHandler::onExecuteDescriptionFix

  1. Bitrix24 API (v. 23.675.0)
  2. tasks
  3. TaskAttachmentHandler
  4. onExecuteDescriptionFix
  • Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/replica/taskattachmenthandler.php
  • Класс: BitrixTasksReplicaTaskAttachmentHandler
  • Вызов: TaskAttachmentHandler::onExecuteDescriptionFix
public function onExecuteDescriptionFix(BitrixMainEvent $event)
{
	$parameters = $event->getParameters();
	$taskId = $parameters[0];
	$fields = $parameters[1];
	$connection = BitrixMainApplication::getConnection();
	$sqlHelper = $connection->getSqlHelper();

	if ($this->replaceGuidsWithFiles($fields))
	{
		$update = $sqlHelper->prepareUpdate("b_tasks", $fields);
		if ($update[0] <> '')
		{
			$sql = "UPDATE ".$sqlHelper->quote("b_tasks")." SET ".$update[0]." WHERE ID = ".$taskId;
			$connection->query($sql);
		}
	}
}

Добавить комментарий