...Человеческий поиск в разработке...
- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/lib/control/task.php
- Класс: BitrixTasksControlTask
- Вызов: Task::updateInlineFiles
private function updateInlineFiles(array $fields, array $relations): array { if (empty($relations)) { return $fields; } $searchTpl = '[DISK FILE ID=%s]'; $search = []; $replace = []; foreach ($relations as $source => $destination) { $search[] = sprintf($searchTpl, $source); $replace[] = sprintf($searchTpl, $destination); if (!preg_match('/^'.BitrixDiskUfFileUserType::NEW_FILE_PREFIX.'/', $source)) { $attachedObject = AttachedObject::loadById($source); if($attachedObject) { $search[] = sprintf($searchTpl, BitrixDiskUfFileUserType::NEW_FILE_PREFIX.$attachedObject->getObjectId()); $replace[] = sprintf($searchTpl, $destination); } } } $fields['DESCRIPTION'] = str_replace($search, $replace, $fields['DESCRIPTION']); return $fields; }