本文整理汇总了PHP中COption::GetOptionInt方法的典型用法代码示例。如果您正苦于以下问题:PHP COption::GetOptionInt方法的具体用法?PHP COption::GetOptionInt怎么用?PHP COption::GetOptionInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COption
的用法示例。
在下文中一共展示了COption::GetOptionInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SynchronizeUserPhones
public static function SynchronizeUserPhones()
{
$offset = intval(COption::GetOptionInt("voximplant", "sync_offset", 0));
$result = Bitrix\Main\UserTable::getList(array('select' => array('ID', 'WORK_PHONE', 'PERSONAL_PHONE', 'PERSONAL_MOBILE', 'UF_PHONE_INNER'), 'filter' => array('=Bitrix\\Voximplant\\Phone:USER.USER_ID' => 0), 'limit' => 100, 'offset' => $offset, 'order' => 'ID'));
$count = 0;
while ($user = $result->fetch()) {
$user["WORK_PHONE"] = CVoxImplantPhone::Normalize($user["WORK_PHONE"]);
if ($user["WORK_PHONE"]) {
VI\PhoneTable::add(array('USER_ID' => intval($user['ID']), 'PHONE_NUMBER' => $user["WORK_PHONE"], 'PHONE_MNEMONIC' => "WORK_PHONE"));
}
$user["PERSONAL_PHONE"] = CVoxImplantPhone::Normalize($user["PERSONAL_PHONE"]);
if ($user["PERSONAL_PHONE"]) {
VI\PhoneTable::add(array('USER_ID' => intval($user['ID']), 'PHONE_NUMBER' => $user["PERSONAL_PHONE"], 'PHONE_MNEMONIC' => "PERSONAL_PHONE"));
}
$user["PERSONAL_MOBILE"] = CVoxImplantPhone::Normalize($user["PERSONAL_MOBILE"]);
if ($user["PERSONAL_MOBILE"]) {
VI\PhoneTable::add(array('USER_ID' => intval($user['ID']), 'PHONE_NUMBER' => $user["PERSONAL_MOBILE"], 'PHONE_MNEMONIC' => "PERSONAL_MOBILE"));
}
$user["UF_PHONE_INNER"] = intval(preg_replace("/[^0-9]/i", "", $user["UF_PHONE_INNER"]));
if ($user["UF_PHONE_INNER"] > 0 && $user["UF_PHONE_INNER"] < 10000) {
VI\PhoneTable::add(array('USER_ID' => intval($user['ID']), 'PHONE_NUMBER' => $user["UF_PHONE_INNER"], 'PHONE_MNEMONIC' => "UF_PHONE_INNER"));
}
$count++;
}
if ($count > 0) {
$offset = $offset + 100;
COption::SetOptionInt("voximplant", "sync_offset", $offset);
return "CVoxImplantPhone::SynchronizeUserPhones();";
} else {
return false;
}
}
示例2: subordinateCheck
function subordinateCheck($arConfigs)
{
global $DB, $USER_FIELD_MANAGER;
$err_mess = "File: " . __FILE__ . "<br>Function: subordinateCheck<br>Line: ";
$ratingId = CRatings::GetAuthorityRating();
if ($ratingId == 0) {
return true;
}
$maxVotes = $arConfigs['CONDITION_CONFIG']['SUBORDINATE']['MAX_VOTES'];
$type = $arConfigs['CONDITION_CONFIG']['SUBORDINATE']['TYPE'];
$iblockId = COption::GetOptionInt('intranet', 'iblock_structure', 0);
global $DB;
$table = 'b_utm_user';
$columns = array('FIELD_ID', 'VALUE_INT', 'VALUE_ID');
if (!$DB->IndexExists($table, $columns)) {
$DB->Query("create index " . substr("ix_" . mt_rand(0, 1000000) . "_" . $table . "_" . implode("_", $columns), 0, 30) . " on " . $table . "(" . implode(", ", $columns) . ")", true);
}
$table = 'b_uts_iblock_' . $iblockId . '_section';
$columns = array('UF_HEAD');
if (!$DB->IndexExists($table, $columns)) {
$DB->Query("create index " . substr("ix_" . mt_rand(0, 1000000) . "_" . $table . "_" . implode("_", $columns), 0, 30) . " on " . $table . "(" . implode(", ", $columns) . ")", true);
}
$fieldId = 0;
$arUserFields = $USER_FIELD_MANAGER->GetUserFields("USER");
if (isset($arUserFields["UF_DEPARTMENT"]["ID"])) {
$fieldId = intval($arUserFields["UF_DEPARTMENT"]["ID"]);
}
if ($iblockId > 0 && $fieldId > 0) {
// truncate table first
$DB->Query("TRUNCATE TABLE b_rating_subordinate", false, $err_mess . __LINE__);
$squery = "\n\t\t\t\tINSERT INTO b_rating_subordinate (RATING_ID, ENTITY_ID, VOTES)\n\t\t\t\tSELECT '" . intval($ratingId) . "' RATING_ID, U2U.USER_ID ENTITY_ID, (case when U2U.ID > 0 then SUM(" . $DB->IsNull("RU.BONUS", "RUS.BONUS") . ") else RUS.BONUS end) VOTES\n\t\t\t\tFROM\n\t\t\t\t(\n\t\t\t\t\tSELECT DISTINCT U.ID USER_ID, UP.VALUE_ID SUBORDINATE_ID, UD.ID\n\t\t\t\t\tFROM\n\t\t\t\t\tb_user U\n\t\t\t\t\tLEFT JOIN b_utm_user UD ON UD.VALUE_ID = U.ID AND UD.FIELD_ID = " . $fieldId . "\n\t\t\t\t\tLEFT JOIN b_uts_iblock_" . $iblockId . "_section BSSV on BSSV.UF_HEAD = U.ID\n\t\t\t\t\tLEFT JOIN b_iblock_section BS ON BS.ID = BSSV.VALUE_ID\n\t\t\t\t\tLEFT JOIN b_iblock_section BsubS on BsubS.IBLOCK_ID = BS.IBLOCK_ID AND BsubS.LEFT_MARGIN >= BS.LEFT_MARGIN AND BsubS.RIGHT_MARGIN <= BS.RIGHT_MARGIN\n\t\t\t\t\tLEFT JOIN b_uts_iblock_" . $iblockId . "_section NACH_PODOTD on NACH_PODOTD.VALUE_ID = BsubS.ID\n\t\t\t\t\tLEFT JOIN b_utm_user UP on (UP.VALUE_INT = BsubS.ID) OR (UP.VALUE_ID = NACH_PODOTD.UF_HEAD) AND UP.FIELD_ID = " . $fieldId . "\n\t\t\t\t\tLEFT JOIN b_user U2 on U2.ID = UP.VALUE_ID\n\t\t\t\t\tWHERE (U2.ACTIVE = 'Y' OR U2.ID IS NULL) AND U.ACTIVE = 'Y'\n\t\t\t\t) U2U\n\t\t\t\tLEFT JOIN b_rating_user RU on RU.RATING_ID = " . intval($ratingId) . " and RU.ENTITY_ID = U2U.SUBORDINATE_ID\n\t\t\t\tLEFT JOIN b_rating_user RUS on RUS.RATING_ID = " . intval($ratingId) . " and RUS.ENTITY_ID = U2U.USER_ID\n\t\t\t\tGROUP BY U2U.USER_ID, U2U.ID, RU.BONUS, RUS.BONUS";
$DB->Query($squery, false, $err_mess . __LINE__);
}
return true;
}
示例3: authenticate
/**
* For Bitrix calls.
*
* @param array &$params
*
* @return int
*/
public static function authenticate(&$params)
{
try {
// Import PEAR library gracefully...
if (!@(include_once 'Net/LDAP2.php')) {
throw new Capall_Ldaper_UnavailableDependencyException('PEAR::Net_LDAP2');
}
$ldapConnection = Net_LDAP2::connect(array('host' => COption::GetOptionString('sh.ldaper', 'host'), 'port' => COption::GetOptionInt('sh.ldaper', 'port'), 'binddn' => COption::GetOptionString('sh.ldaper', 'binddn'), 'bindpw' => COption::GetOptionString('sh.ldaper', 'bindpw')));
if (PEAR::isError($ldapConnection)) {
throw new Capall_Ldaper_LdapException($ldapConnection);
}
$ldaper = new self($ldapConnection, new Capall_Ldaper_BitrixUserManager(new CUser(), array_filter(explode(',', COption::GetOptionString('sh.ldaper', 'default_groups', '')), 'trim')), COption::GetOptionString('sh.ldaper', 'basedn'), COption::GetOptionString('sh.ldaper', 'login_attribute'), COption::GetOptionString('sh.ldaper', 'mail_attribute'), COption::GetOptionString('sh.ldaper', 'mail_attribute_index'));
$ldapUser = $ldaper->getLdapUser($params['LOGIN']);
if ($ldapUser) {
if ($ldaper->authenticateUser($ldapUser, $params['PASSWORD'])) {
$bitrixUserIdentifier = $ldaper->getBitrixUser($ldapUser);
} else {
// Authentication failed. May be user not from LDAP?
return false;
}
} else {
// User not found. It's normal use case.
return;
}
// Return identifier to Bitrix for authorization.
return $bitrixUserIdentifier;
} catch (Exception $error) {
CEventLog::Log('WARNING', 'USER_LOGIN', 'sh.ldaper', $params['LOGIN'], (string) $error);
}
}
示例4: custom_mail
/**
* @see CEvent::HandleEvent()
* @see bxmail()
*
* @param string $to
* @param string $subject
* @param string $message
* @param string $additionalHeaders Additional headers setted by Bitrix.
*
* @return bool
*/
function custom_mail($to, $subject, $message, $additionalHeaders = '')
{
// Cache to send many mails in one script run.
static $transport, $sender;
try {
if (!$sender) {
if (!$transport) {
$host = COption::GetOptionString('sh.mailtransport', 'host');
if (COption::GetOptionInt('sh.mailtransport', 'ssl')) {
$host = 'ssl://' . $host;
}
$port = COption::GetOptionInt('sh.mailtransport', 'port');
$user = COption::GetOptionString('sh.mailtransport', 'username');
$password = COption::GetOptionString('sh.mailtransport', 'password');
$transport = new Net_SMTP($host, $port);
if (PEAR::isError($connectionResult = $transport->connect())) {
throw new Capall_MailTransportException($connectionResult);
}
// TODO Server without authentication?..
if (PEAR::isError($authenticationResult = $transport->auth($user, $password))) {
throw new Capall_MailTransportException($authenticationResult);
}
}
$sender = new Capall_MailTransport_Sender($transport);
}
$sender->send($to, $subject, $message, $additionalHeaders);
return true;
} catch (Capall_MailTransportException $error) {
CEventLog::Log('WARNING', 'MAILTRANSPORT_ERROR', 'sh.mailtransport', null, $error->__toString());
return false;
} catch (Exception $error) {
// Unknown error...
return false;
}
}
示例5: UnInstallDB
function UnInstallDB($arParams = array())
{
global $DB, $APPLICATION;
$this->errors = false;
if (!array_key_exists("savedata", $arParams) || $arParams["savedata"] != "Y") {
$this->errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/meeting/install/db/" . strtolower($DB->type) . "/uninstall.sql");
if ($this->errors === false && CModule::IncludeModule('forum')) {
$dbRes = CSite::GetList($by = 'sort', $order = 'asc', array());
while ($arSite = $dbRes->Fetch()) {
$forumId = COption::GetOptionInt('meeting', 'comments_forum_id', 0, $arSite['ID']);
if ($forumId > 0) {
CForumNew::Delete($forumId);
}
}
}
}
UnRegisterModuleDependences("calendar", "OnAfterCalendarConvert", "meeting", "CMeetingEventHandlers", "OnAfterCalendarConvert");
UnRegisterModuleDependences("tasks", "OnTaskDelete", "meeting", "CMeetingEventHandlers", "OnTaskDelete");
UnRegisterModule("meeting");
if ($this->errors !== false) {
$APPLICATION->ThrowException(implode("<br>", $this->errors));
return false;
}
return true;
}
示例6: Delete
/**
* <p>Метод удаляет файл из таблицы зарегистрированных файлов (b_file) и с диска. Статичный метод.</p>
*
*
* @param int $id Цифровой идентификатор файла.
*
* @return mixed
*
* <h4>Example</h4>
* <pre>
* <?
* // удаляем изображение формы
* $arFilter = array("ID" => 1, "ID_EXACT_MATCH" => "Y");
* $rsForm = CForm::GetList($by, $order, $arFilter, $is_filtered);
* if ($arForm = $rsForm->Fetch())
* {
* if (intval($arForm["IMAGE_ID"])>0) <b>CFile::Delete</b>($arForm["IMAGE_ID"]);
* }
* ?>
* </pre>
*
*
* <h4>See Also</h4>
* <ul> <li> <a href="http://dev.1c-bitrix.ru/api_help/main/functions/file/deletedirfiles.php">DeleteDirFiles</a> </li>
* <li> <a href="http://dev.1c-bitrix.ru/api_help/main/functions/file/deletedirfilesex.php">DeleteDirFilesEx</a> </li>
* </ul><a name="examples"></a>
*
*
* @static
* @link http://dev.1c-bitrix.ru/api_help/main/reference/cfile/delete.php
* @author Bitrix
*/
public static function Delete($ID)
{
global $DB;
$io = CBXVirtualIo::GetInstance();
$ID = intval($ID);
if ($ID <= 0) {
return;
}
$res = CFile::GetByID($ID);
if ($res = $res->Fetch()) {
$delete_size = 0;
$upload_dir = COption::GetOptionString("main", "upload_dir", "upload");
$dname = $_SERVER["DOCUMENT_ROOT"] . "/" . $upload_dir . "/" . $res["SUBDIR"];
$fname = $dname . "/" . $res["FILE_NAME"];
$file = $io->GetFile($fname);
if ($file->isExists() && $file->unlink()) {
$delete_size += $res["FILE_SIZE"];
}
$delete_size += CFile::ResizeImageDelete($res);
$DB->Query("DELETE FROM b_file WHERE ID = " . $ID);
$directory = $io->GetDirectory($dname);
if ($directory->isExists() && $directory->isEmpty()) {
$directory->rmdir();
}
CFile::CleanCache($ID);
foreach (GetModuleEvents("main", "OnFileDelete", true) as $arEvent) {
ExecuteModuleEventEx($arEvent, array($res));
}
/****************************** QUOTA ******************************/
if ($delete_size > 0 && COption::GetOptionInt("main", "disk_space") > 0) {
CDiskQuota::updateDiskQuota("file", $delete_size, "delete");
}
/****************************** QUOTA ******************************/
}
}
示例7: BXDeleteFromSystem
function BXDeleteFromSystem($absoluteFilePath, $path, $site)
{
$io = CBXVirtualIo::GetInstance();
$f = $io->GetFile($absoluteFilePath);
$f->MarkWritable();
if (COption::GetOptionInt("main", "disk_space") > 0) {
$file_size = $f->GetFileSize();
$quota = new CDiskQuota();
$quota->UpdateDiskQuota("file", $file_size, "delete");
}
$sucess = $io->Delete($absoluteFilePath);
if (!$sucess) {
return false;
}
if (COption::GetOptionString($module_id, "log_page", "Y") == "Y") {
$res_log['path'] = substr($path, 1);
CEventLog::Log("content", "PAGE_DELETE", "main", "", serialize($res_log));
}
$GLOBALS["APPLICATION"]->RemoveFileAccessPermission(array($site, $path));
if (CModule::IncludeModule("search")) {
CSearch::DeleteIndex("main", $site . "|" . $path);
}
//Delete from rewrite rule
CUrlRewriter::Delete(array("SITE_ID" => $site, "PATH" => $path));
if (class_exists("\\Bitrix\\Main\\Application", false)) {
\Bitrix\Main\Component\ParametersTable::deleteByFilter(array("SITE_ID" => $site, "REAL_PATH" => $path));
}
return true;
}
示例8: OnPageStart
public static function OnPageStart()
{
if(!defined("PERFMON_STOP"))
{
$end_time = COption::GetOptionInt("perfmon", "end_time");
if(time() > $end_time)
{
CPerfomanceKeeper::SetActive(false);
if(COption::GetOptionString("perfmon", "total_mark_value", "") == "measure");
COption::SetOptionString("perfmon", "total_mark_value", "calc");
}
else
{
global $DB, $APPLICATION;
// define("PERFMON_STARTED", $DB->ShowSqlStat);
$DB->ShowSqlStat = true;
$APPLICATION->ShowIncludeStat = true;
global $perfmonErrors;
$perfmonErrors = array();
if(COption::GetOptionString("perfmon", "warning_log") === "Y")
set_error_handler("perfmonErrorHandler");
}
}
}
示例9: Execute
public function Execute()
{
if (!CModule::IncludeModule("intranet")) {
return CBPActivityExecutionStatus::Closed;
}
$calendarIblockId = COption::GetOptionInt("intranet", 'iblock_calendar', 0);
if ($calendarIblockId <= 0) {
return CBPActivityExecutionStatus::Closed;
}
$rootActivity = $this->GetRootActivity();
$documentId = $rootActivity->GetDocumentId();
$arCalendarUser = CBPHelper::ExtractUsers($this->CalendarUser, $documentId);
foreach ($arCalendarUser as $calendarUser) {
$Params = array('iblockId' => $calendarIblockId, 'ownerType' => "USER", 'ownerId' => $calendarUser, 'cacheTime' => 0, 'pageUrl' => false, 'allowSuperpose' => false, 'allowResMeeting' => false, 'allowVideoMeeting' => false, 'userIblockId' => $calendarIblockId);
$EC = new CEventCalendar();
$EC->Init($Params);
$sectionId = $EC->GetSectionIDByOwnerId($calendarUser, 'USER', $calendarIblockId);
if ($sectionId <= 0) {
$sectionId = CEventCalendar::CreateSectionForOwner($calendarUser, "USER", $calendarIblockId);
}
$arGuestCalendars = $EC->GetCalendars(array('sectionId' => $sectionId, 'iblockId' => $calendarIblockId, 'ownerType' => 'USER', 'ownerId' => $calendarUser, 'bOwner' => true, 'forExport' => true, 'bOnlyID' => true));
$arParams = array('iblockId' => $calendarIblockId, 'ownerType' => "USER", 'ownerId' => $calendarUser, 'sectionId' => $sectionId, 'bNew' => true, 'name' => $this->CalendarName, 'desc' => $this->CalendarDesrc, 'dateFrom' => cutZeroTime($this->CalendarFrom), 'dateTo' => cutZeroTime($this->CalendarTo), 'isMeeting' => false, 'prop' => array('PERIOD_TYPE' => 'NONE', 'ACCESSIBILITY' => 'busy', 'IMPORTANCE' => 'normal', 'PRIVATE' => false), 'userId' => $calendarUser, 'userIblockId' => $calendarIblockId, 'location' => array('new' => '', 'change' => true));
if (count($arGuestCalendars) > 0) {
$arParams["calendarId"] = $arGuestCalendars[0];
}
$EC->SaveEvent($arParams);
}
if (isset($EC)) {
$EC->ClearCache($EC->cachePath . 'events/' . $calendarIblockId . '/');
}
return CBPActivityExecutionStatus::Closed;
}
示例10: __OnAfterSetOption_disk_space
function __OnAfterSetOption_disk_space($value)
{
if (COption::GetOptionInt("main", "disk_space") > 0) {
RegisterModuleDependences("main", "OnEpilog", "main", "CDiskQuota", "setDBSize");
} else {
UnRegisterModuleDependences("main", "OnEpilog", "main", "CDiskQuota", "setDBSize");
}
}
示例11: IntOption
function IntOption($name, $def = 0)
{
static $CACHE;
if (!$CACHE[$name]) {
$CACHE[$name] = COption::GetOptionInt("main", $name, $def);
}
return $CACHE[$name];
}
示例12: get_sOption
/**
* @param $key
* @param bool $int
* @return int|string
*/
function get_sOption($key, $int = false)
{
if (!$int) {
return COption::GetOptionString("safin", $key);
} else {
return COption::GetOptionInt("safin", $key);
}
}
示例13: GetExtranetUserGroupID
function GetExtranetUserGroupID()
{
$extranet_group_id = COption::GetOptionInt("extranet", "extranet_group");
if (intval($extranet_group_id) > 0) {
return intval($extranet_group_id);
}
return false;
}
示例14: checkErrorReporting
/**
* Return true if error_reporting = 0
*
* @return bool
* @since 14.0.0
*/
protected function checkErrorReporting()
{
$validErrorReporting = E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR | E_PARSE;
if (COption::GetOptionInt("main", "error_reporting", $validErrorReporting) != $validErrorReporting && COption::GetOptionInt("main", "error_reporting", "") != 0) {
return self::STATUS_FAILED;
} else {
return self::STATUS_PASSED;
}
}
示例15: get_sections_menu
public static function get_sections_menu($IBLOCK_TYPE_ID, $IBLOCK_ID, $DEPTH_LEVEL, $SECTION_ID, $arSectionsChain = false)
{
global $adminMenu;
if (false === $arSectionsChain) {
$arSectionsChain = array();
if (isset($_REQUEST['admin_mnu_menu_id'])) {
$menu_id = "menu_catalog_category_" . $IBLOCK_ID . "/";
if (0 == strncmp($_REQUEST['admin_mnu_menu_id'], $menu_id, strlen($menu_id))) {
$rsSections = CIBlockSection::GetNavChain($IBLOCK_ID, substr($_REQUEST['admin_mnu_menu_id'], strlen($menu_id)), array('ID', 'IBLOCK_ID'));
while ($arSection = $rsSections->Fetch()) {
$arSectionsChain[$arSection["ID"]] = $arSection["ID"];
}
}
}
if (isset($_REQUEST["find_section_section"]) && (int) $_REQUEST["find_section_section"] > 0 && isset($_REQUEST["IBLOCK_ID"]) && $_REQUEST["IBLOCK_ID"] == $IBLOCK_ID) {
$rsSections = CIBlockSection::GetNavChain($IBLOCK_ID, $_REQUEST["find_section_section"], array('ID', 'IBLOCK_ID'));
while ($arSection = $rsSections->Fetch()) {
$arSectionsChain[$arSection["ID"]] = $arSection["ID"];
}
}
}
$urlSectionAdminPage = CIBlock::GetAdminSectionListLink($IBLOCK_ID, array('catalog' => null));
$arSections = array();
$rsSections = CIBlockSection::GetList(array("left_margin" => "ASC"), array("IBLOCK_ID" => $IBLOCK_ID, "SECTION_ID" => $SECTION_ID), false, array("ID", "IBLOCK_SECTION_ID", "NAME", "LEFT_MARGIN", "RIGHT_MARGIN"));
$intCount = 0;
$arOtherSectionTmp = array();
$limit = (int) COption::GetOptionInt("iblock", "iblock_menu_max_sections");
while ($arSection = $rsSections->Fetch()) {
if ($limit > 0 && $intCount >= $limit) {
if (empty($arOtherSectionTmp)) {
$arOtherSectionTmp = array("text" => Loc::getMessage("CAT_MENU_ALL_OTH"), "url" => $urlSectionAdminPage . "&find_section_section=" . (int) $arSection["IBLOCK_SECTION_ID"], "more_url" => array(CIBlock::GetAdminSectionEditLink($IBLOCK_ID, $arSection["ID"], array('catalog' => null))), "title" => Loc::getMessage("CAT_MENU_ALL_OTH_TITLE"), "icon" => "iblock_menu_icon_sections", "page_icon" => "iblock_page_icon_sections", "skip_chain" => true, "items_id" => "menu_catalog_category_" . $IBLOCK_ID . "/" . $arSection["ID"], "module_id" => "catalog", "items" => array());
CCatalogAdmin::get_other_elements_menu($IBLOCK_TYPE_ID, $IBLOCK_ID, $arSection, $arOtherSectionTmp["more_url"]);
} else {
$arOtherSectionTmp['more_url'][] = $urlSectionAdminPage . "&find_section_section=" . (int) $arSection["ID"];
$arOtherSectionTmp['more_url'][] = CIBlock::GetAdminSectionEditLink($IBLOCK_ID, $arSection["ID"], array('catalog' => null));
}
} else {
$arSectionTmp = array("text" => htmlspecialcharsex($arSection["NAME"]), "url" => $urlSectionAdminPage . "&find_section_section=" . $arSection["ID"], "more_url" => array(CIBlock::GetAdminSectionEditLink($IBLOCK_ID, $arSection["ID"], array('catalog' => null))), "title" => htmlspecialcharsex($arSection["NAME"]), "icon" => "iblock_menu_icon_sections", "page_icon" => "iblock_page_icon_sections", "skip_chain" => true, "items_id" => "menu_catalog_category_" . $IBLOCK_ID . "/" . $arSection["ID"], "module_id" => "catalog", "dynamic" => $arSection["RIGHT_MARGIN"] - $arSection["LEFT_MARGIN"] > 1, "items" => array());
if (isset($arSectionsChain[$arSection["ID"]])) {
$arSectionTmp["items"] = CCatalogAdmin::get_sections_menu($IBLOCK_TYPE_ID, $IBLOCK_ID, $DEPTH_LEVEL + 1, $arSection["ID"], $arSectionsChain);
} elseif (method_exists($adminMenu, "IsSectionActive")) {
if ($adminMenu->IsSectionActive("menu_catalog_category_" . $IBLOCK_ID . "/" . $arSection["ID"])) {
$arSectionTmp["items"] = CCatalogAdmin::get_sections_menu($IBLOCK_TYPE_ID, $IBLOCK_ID, $DEPTH_LEVEL + 1, $arSection["ID"], $arSectionsChain);
}
}
$arSections[] = $arSectionTmp;
}
$intCount++;
}
if (!empty($arOtherSectionTmp)) {
$arSections[] = $arOtherSectionTmp;
}
return $arSections;
}