- Модуль: iblock
- Путь к файлу: ~/bitrix/modules/iblock/classes/general/iblock_rights.php
- Класс: CIBlockRightsStorage
- Вызов: CIBlockRightsStorage::_get_section
function _get_section()
{
if(!isset($this->arSection))
{
if($this->SECTION_ID > 0)
{
$rsSection = CIBlockSection::GetList(array(), array(
"IBLOCK_ID" => $this->IBLOCK_ID,
"=ID" => $this->SECTION_ID,
"CHECK_PERMISSIONS" => "N",
), false, array("LEFT_MARGIN", "RIGHT_MARGIN"));
$this->arSection = $rsSection->Fetch();
//We have to resort sections in some cases
if(
$this->arSection
&& (
$this->arSection["LEFT_MARGIN"] <= 0
|| $this->arSection["RIGHT_MARGIN"] <= 0
)
)
{
CIBlockSection::Resort($this->IBLOCK_ID);
$rsSection = CIBlockSection::GetList(array(), array(
"IBLOCK_ID" => $this->IBLOCK_ID,
"=ID" => $this->SECTION_ID,
"CHECK_PERMISSIONS" => "N",
), false, array("LEFT_MARGIN", "RIGHT_MARGIN"));
$this->arSection = $rsSection->Fetch();
}
}
else
{
$this->arSection = false;
}
}
return $this->arSection;
}