...Человеческий поиск в разработке...
- Модуль: bizproc
- Путь к файлу: ~/bitrix/modules/bizproc/classes/general/helper.php
- Класс: CBPHelper
- Вызов: CBPHelper::getFieldValuePrintable
static function getFieldValuePrintable($fieldName, $fieldType, $result) { $newResult = null; switch ($fieldType) { case "user": if (is_array($result)) { $newResult = []; foreach ($result as $r) { $newResult[] = CBPHelper::ConvertUserToPrintableForm($r); } } else { $newResult = CBPHelper::ConvertUserToPrintableForm($result); } break; case "file": if (is_array($result)) { $newResult = array(); foreach ($result as $r) { $r = intval($r); $dbImg = CFile::GetByID($r); if ($arImg = $dbImg->Fetch()) { $newResult[] = "[url=/bitrix/tools/bizproc_show_file.php?f=".urlencode($arImg["FILE_NAME"])."&i=".$r."]".htmlspecialcharsbx($arImg["ORIGINAL_NAME"])."[/url]"; } } } else { $result = intval($result); $dbImg = CFile::GetByID($result); if ($arImg = $dbImg->Fetch()) { $newResult = "[url=/bitrix/tools/bizproc_show_file.php?f=".urlencode($arImg["FILE_NAME"])."&i=".$result."]".htmlspecialcharsbx($arImg["ORIGINAL_NAME"])."[/url]"; } } break; default: $newResult = $result; } return $newResult; }