• Модуль: intranet
  • Путь к файлу: ~/bitrix/modules/intranet/classes/general/hrxml.php
  • Класс: CUserHRXMLImport
  • Вызов: CUserHRXMLImport::CheckIBlock
function CheckIBlock($id, $type)
{
	$bError = false;
	if (!empty($id) && !empty($type))
	{
		$dbRes = CIBlock::GetList(
			array(),
			array(
				'TYPE' => $type,
				'ID' => $id,
			)
		);

		if (intval($dbRes->SelectedRowsCount()) < 1)
		{
			$bError = true;
		}
	}
	else
	{
		$bError = true;
	}

	if ($bError)
		return false;

	return true;
}