• Модуль: intranet
  • Путь к файлу: ~/bitrix/modules/intranet/classes/general/sharepoint.php
  • Класс: CAllIntranetSharepoint
  • Вызов: CAllIntranetSharepoint::GetByID
static function GetByID($ID, $bFull = false)
{
	global $DB;

	if ($res = self::_GetWhere($ID))
	{
		$res = $DB->Query('SELECT * FROM b_intranet_sharepoint WHERE '.$res);

		if ($bFull)
		{
			if ($arRes = $res->Fetch())
			{
				$res = $DB->Query('SELECT * FROM b_intranet_sharepoint_field WHERE IBLOCK_ID=''.$arRes['IBLOCK_ID'].''');
				$arRes['FIELDS'] = array();
				while ($arField = $res->Fetch())
					$arRes['FIELDS'][] = $arField;

				$res = new CDBResult();
				$res->InitFromArray(array($arRes));
			}
		}
	}
	else
	{
		$res = new CDBResult();
	}

	return $res;
}