• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/dbresult.php
  • Класс: CAllDBResult
  • Вызов: CAllDBResult::GetNext
public function GetNext($bTextHtmlAuto = true, $use_tilda = true)
{
	if ($arRes = $this->Fetch())
	{
		if (!$this->arGetNextCache)
		{
			$this->arGetNextCache = [];
			foreach ($arRes as $FName => $arFValue)
			{
				$this->arGetNextCache[$FName] = array_key_exists($FName . "_TYPE", $arRes);
			}
		}
		if ($use_tilda)
		{
			$arTilda = [];
			foreach ($arRes as $FName => $arFValue)
			{
				if (isset($this->arGetNextCache[$FName]) && $this->arGetNextCache[$FName] && $bTextHtmlAuto)
				{
					$arTilda[$FName] = FormatText($arFValue, $arRes[$FName . "_TYPE"]);
				}
				elseif (is_array($arFValue))
				{
					$arTilda[$FName] = htmlspecialcharsEx($arFValue);
				}
				elseif ($arFValue != '' && preg_match("/[;&<>"]/", $arFValue))
				{
					$arTilda[$FName] = htmlspecialcharsEx($arFValue);
				}
				else
				{
					$arTilda[$FName] = $arFValue;
				}
				$arTilda["~" . $FName] = $arFValue;
			}
			return $arTilda;
		}
		else
		{
			foreach ($arRes as $FName => $arFValue)
			{
				if ($this->arGetNextCache[$FName] && $bTextHtmlAuto)
				{
					$arRes[$FName] = FormatText($arFValue, $arRes[$FName . "_TYPE"]);
				}
				elseif (is_array($arFValue))
				{
					$arRes[$FName] = htmlspecialcharsEx($arFValue);
				}
				elseif (preg_match("/[;&<>"]/", $arFValue))
				{
					$arRes[$FName] = htmlspecialcharsEx($arFValue);
				}
			}
		}
	}
	return $arRes;
}