• Модуль: report
  • Путь к файлу: ~/bitrix/modules/report/classes/general/report_helper.php
  • Класс: CReportHelper
  • Вызов: CReportHelper::getUserFieldFileValue
static function getUserFieldFileValue($valueKey, $ufInfo)
{
	$valueKey = intval($valueKey);
	$value = '';

	if ($valueKey > 0)
	{
		if (is_array(self::$ufFiles) && is_array(self::$ufFiles[$valueKey]))
		{
			$arFile = self::$ufFiles[$valueKey];
			/*
			 * save security
			 *
			$src = $arFile['SRC'];
			$file = new CFile();
			$value = 'FormatSize($arFile['FILE_SIZE'])).'">'.
				htmlspecialcharsbx($arFile['FILE_NAME']).'';
			*/
			$file = new CFile();
			$value = htmlspecialcharsbx($arFile['FILE_NAME'].' ('.$file->FormatSize($arFile['FILE_SIZE']).')');
		}
		else
		{
			$value = htmlspecialcharsbx(GetMessage('REPORT_FILE_NOT_FOUND'));
		}
	}

	return $value;
}