• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/classes/general/iblocksection.php
  • Класс: CAllIBlockSection
  • Вызов: CAllIBlockSection::checkLoadSections
static function checkLoadSections(array $filter): bool
{
	$result = true;
	if (!empty($filter))
	{
		$blackList = [
			'TAGS' => true,
			'SHOW_COUNTER' => true,
			'IBLOCK_SECTION_ID' => true,
			'SHOW_COUNTER_START' => true,
			'CHECK_BP_PERMISSIONS' => true,
			'CHECK_BP_VIRTUAL_PERMISSIONS' => true,
			'ACTIVE_FROM' => true,
			'ACTIVE_TO' => true,
			'ACTIVE_DATE' => true,
			'RATING_USER_ID' => true,
			'WF_STATUS_ID' => true,
			'WF_LOCK_STATUS' => true,
			'WF_LAST_STATUS_ID' => true,
			'WF_PARENT_ELEMENT_ID' => true,
			'WF_COMMENTS' => true,
			'SEARCHABLE_CONTENT' => true,
			'INCLUDE_SUBSECTIONS' => true,
		];
		$catalogIncluded = Loader::includeModule('catalog');
		foreach($filter as $index => $value)
		{
			if (
				($index === '=ID' && (is_int($value) || is_string($value)))
				|| $value instanceof CIBlockElement
			)
			{
				$result = false;
				break;
			}
			$op = CIBlock::MkOperationFilter($index);
			$field = $op['FIELD'];
			if ($field === 'SUBQUERY' && is_array($value))
			{
				$result = false;
				break;
			}
			if (
				strncmp($field, 'PROPERTY_', 9) === 0
				|| isset($blackList[$field])
				|| ($catalogIncluded && CProductQueryBuilder::isRealFilterField($field))
			)
			{
				$result = false;
				break;
			}
		}
		unset($field, $op);
	}
	return $result;
}