$cache_vars_name = explode(",", $matches[1]); if (!empty($cache_vars_name)) { // correcting foreach ($cache_vars_name as $k => $v) { $_variable_name = trim(str_replace('$', "", $v)); $cache_vars[$_variable_name] = ${$_variable_name}; // clear unset($_variable_name); } // clear unset($cache_vars_name); } } } $subLink = nc_folder_path($cc_env['Subdivision_ID']); $ccLink = nc_infoblock_path($cc_env['Sub_Class_ID']); if (!$cc_env['File_Mode']) { // get component body $component_body = $cc_env['RecordTemplateFull'] . $cc_env['Settings']; // other forms $cc_env["AddTemplate"] = $cc_env["AddTemplate"] ? $cc_env["AddTemplate"] : $component->add_form($catalogue, $sub, $cc); $cc_env["FullSearchTemplate"] = $cc_env["FullSearchTemplate"] ? $cc_env["FullSearchTemplate"] : $component->search_form(1); } else { // get component body $component_body = nc_check_file($file_class->get_field_path('RecordTemplateFull')) ? nc_get_file($file_class->get_field_path('RecordTemplateFull')) : null; $component_body .= nc_check_file($file_class->get_field_path('Settings')) ? nc_get_file($file_class->get_field_path('Settings')) : null; } // FIXME: Сломано (не определены переменные-аргументы showSearchForm): $nc_search_form = "<form method='get' action='" . nc_folder_path($current_sub['Subdivision_ID']) . "'>" . showSearchForm($field_descript, $field_type, $field_search, $field_format) . "<input type='submit' value='" . NETCAT_SEARCH_FIND_IT . "' /></form>"; $routing_object_parameters = !$routing_module_enabled ? null : array('site_id' => $catalogue, 'folder' => substr($f_Hidden_URL, strlen($SUB_FOLDER)), 'folder_id' => $f_Subdivision_ID, 'infoblock_id' => $f_Sub_Class_ID, 'infoblock_keyword' => $cc_env['EnglishName'], 'object_id' => $f_RowID, 'object_keyword' => $f_Keyword, 'action' => 'full', 'format' => 'html', 'date' => $date_field ? date("Y-m-d", strtotime(${"f_{$date_field}"})) : null); if ($admin_mode) {
/** * Возвращает полный (с доменным именем) URL инфоблока с указанным идентификатором. * * @param int $infoblock_id Идентификатор инфоблока * @param string $action Действие: index|add|search|subscribe * @param string $format Формат ответа: html|rss|xml * @param string|null $date Дата, которую следует добавить к пути (формат даты: YYYY, YYYY-mm, YYYY-mm-dd) * @param array $variables * @return string|false */ function nc_infoblock_url($infoblock_id, $action = 'index', $format = 'html', $date = null, array $variables = null) { $infoblock_path = nc_infoblock_path($infoblock_id, $action, $format, $date, $variables); if (!$infoblock_path) { return false; } $nc_core = nc_core::get_object(); $site_id = $nc_core->sub_class->get_by_id($infoblock_id, 'Catalogue_ID'); $domain = $nc_core->catalogue->get_by_id($site_id, 'Domain'); return "//" . $domain . $infoblock_path; }