• Модуль: report
  • Путь к файлу: ~/bitrix/modules/report/classes/general/report.php
  • Класс: CReport
  • Вызов: CReport::collectFullHumanTitles
static function collectFullHumanTitles($tree)
{
	$fullHumanTitles = array();

	foreach ($tree as $treeElem)
	{
		//$fullHumanTitles[$treeElem['fieldName']] = $treeElem['fullHumanTitle'];
		$fullHumanTitle = $treeElem['fullHumanTitle'];
		if (mb_substr($treeElem['fieldName'], -11) == '.SHORT_NAME')    // hack for ticket 0037576
		{
			$pos = mb_strrpos($fullHumanTitle, ':');
			if ($pos !== false)
			{
				$fullHumanTitle = mb_substr($fullHumanTitle, 0, $pos);
			}
		}
		$fullHumanTitles[$treeElem['fieldName']] = $fullHumanTitle;
		unset($fullHumanTitle);

		if (!empty($treeElem['branch']))
		{
			$fullHumanTitles = array_merge($fullHumanTitles, self::collectFullHumanTitles($treeElem['branch']));
		}
	}

	return $fullHumanTitles;
}