• Модуль: fileman
  • Путь к файлу: ~/bitrix/modules/fileman/classes/general/snippets.php
  • Класс: CSnippets
  • Вызов: CSnippets::UpdateContentInfo
static function UpdateContentInfo(&$ar, &$arKeys, $template)
{
	$basePath = self::GetBasePath($template);

	if (file_exists($basePath."/.content.php"))
	{
		@include($basePath."/.content.php");
		$arK = array_keys($SNIPPETS);
		for ($i=0, $len = count($arK); $i<$len;$i++)
		{
			$name = $arK[$i];
			$pos = mb_strrpos($name, ".");
			$f_name = ($pos !== FALSE)? mb_substr($name, 0, $pos) : $name;
			if ($ar[$f_name.".snp"])
			{
				$ar[$f_name.".snp"]['title'] = stripslashes($SNIPPETS[$name]['title']);
				$ar[$f_name.".snp"]['description'] = stripslashes($SNIPPETS[$name]['description'] ?? '');
			}
		}
	}
}