/home/bitrix/www/bitrix/modules/main/lib/db/mysqlcommonconnection.php
$res = $this->query("SHOW VARIABLES LIKE 'max_allowed_packet'")->fetch();
if ($res['Variable_name'] == 'max_allowed_packet')
{
$mtu = intval($res['Value']);
}
}
return $mtu;
}
/**
* @inheritdoc
*/
public function createQueryException($code = 0, $databaseMessage = '', $query = '')
{
if ($code == 1062)
{
return new DuplicateEntryException('Mysql query error', $databaseMessage, $query);
}
return new SqlQueryException('Mysql query error', $databaseMessage, $query);
}
}
Arguments
"Mysql query error: (3) Error writing file '/tmp/MYEeseoI' (Errcode: 28 - No space left on device)"
/home/bitrix/www/bitrix/modules/main/classes/general/database.php
}
if (!$result)
{
$this->db_Error = $this->GetError();
$this->db_ErrorSQL = $strSql;
if (!$bIgnoreErrors)
{
if ($this->DebugToFile)
{
$this->startSqlTracker()->writeFileLog("ERROR: " . $this->db_Error, 0, "CONN: " . $this->getThreadId());
}
if (defined('ERROR_EMAIL') && ERROR_EMAIL != '')
{
$error_position = preg_replace("#<br[^>]*>#i", "\n", $error_position);
SendError($error_position . "\nQuery Error:\n" . $strSql . " \n [" . $this->db_Error . "]\n---------------\n\n");
}
throw $this->connection->createQueryException($this->GetErrorCode(), $this->db_Error, $strSql);
}
return false;
}
$res = new CDBResult($result);
$res->DB = $this;
if ($DB->ShowSqlStat)
{
$res->SqlTraceIndex = count($DB->arQueryDebug) - 1;
}
return $res;
}
public function QueryBind($strSql, $arBinds, $bIgnoreErrors = false)
{
return $this->Query($strSql, $bIgnoreErrors);
}
/**
* @deprecated Will be removed.
/home/bitrix/www/bitrix/modules/iblock/classes/mysql/iblockelement.php
SELECT ".$el->sSelect."
FROM ".$el->sFrom."
WHERE 1=1 ".$el->sWhere."
".$el->sGroupBy."
".$el->sOrderBy."
";
$res = new CDBResult();
$res->NavQuery($strSql, $cnt, $arNavStartParams);
}
}
else//if(is_array($arNavStartParams))
{
$strSql = "
SELECT ".$el->sSelect."
FROM ".$el->sFrom."
WHERE 1=1 ".$el->sWhere."
".$el->sGroupBy."
".$el->sOrderBy."
";
$res = $DB->Query($strSql);
}
$res = new CIBlockResult($res);
$res->SetIBlockTag($el->arFilterIBlocks);
$res->arIBlockMultProps = $el->arIBlockMultProps;
$res->arIBlockConvProps = $el->arIBlockConvProps;
$res->arIBlockAllProps = $el->arIBlockAllProps;
$res->arIBlockNumProps = $el->arIBlockNumProps;
$res->arIBlockLongProps = $el->arIBlockLongProps;
return $res;
}
///////////////////////////////////////////////////////////////////
// Update element function
///////////////////////////////////////////////////////////////////
public function Update($ID, $arFields, $bWorkFlow=false, $bUpdateSearch=true, $bResizePictures=false, $bCheckDiskQuota=true)
{
global $DB;
$ID = (int)$ID;
/home/bitrix/www/local/templates/sotbit_origami/components/bitrix/catalog.element/.default/result_modifier.php
$arResult['FIRST_OFFERS_SELECTED'] = $arResult['OFFERS_SELECTED'];
\SotbitOrigami::checkOfferPage($arResult, $arParams);
$arResult['OFFERS_SELECTED'] = \SotbitOrigami::getOffersSelected($arResult, $arParams);
$arResult['IPROPERTY_VALUES'] = \SotbitOrigami::getSeoOffer($arResult);
$template = $this->__name;
if ($this->__name == '.default')
{
$template = '';
} else if ($this->__name == 'origami_no_tabs') {
$template = 'NO_TABS';
}
if (Config::get('SHOW_NAVIGATION_'.$template) == 'Y') {
$arFilter["IBLOCK_ID"] = $arParams["IBLOCK_ID"];
$arFilter["ACTIVE"] = "Y";
$arFilter["SECTION_ID"] = $arResult["IBLOCK_SECTION_ID"];
$arSelect = array("ID", "NAME", /*"PREVIEW_PICTURE", "DETAIL_PICTURE",*/ "DETAIL_PAGE_URL", "PROPERTY_FILES", "PROPERTY_SSYLKA_DO_FAYLA", "PROPERTY_SSYLKI_NA_FAYLY");
$rsItems = CIBlockElement::GetList(array($arSort), $arFilter, false, array(), $arSelect);
while ($item = $rsItems->GetNext())
if ($item != false) {
$lastItem = $item;
}
$rsElement = CIBlockElement::GetList(array($arSort), $arFilter, false, array("nPageSize"=>2, "nElementID"=>$arResult["ID"]), $arSelect);
$arElementNav = array();
while($arElement = $rsElement->GetNext()) {
$arElementNav[] = $arElement;
}
foreach ($arElementNav as $key => $item) {
if ($item['ID'] == $arResult['ID']) {
if ($arElementNav[$key+1]) {
$nextItem = $arElementNav[$key+1];
} else {
$nextItem = CIBlockElement::GetList(array($arSort), $arFilter, false, array("nPageSize"=>1), $arSelect)->GetNext();
}
if ($arElementNav[$key-1]) {
/home/bitrix/www/bitrix/modules/main/classes/general/component_template.php
}
/**
* @param array &$arResult
* @param array &$arParams
*
* @return void
* @internal
*/
public function __IncludeMutatorFile(/** @noinspection PhpUnusedParameterInspection */
&$arResult, &$arParams)
{
/** @noinspection PhpUnusedLocalVariableInspection */
global $APPLICATION, $USER, $DB;
if($this->__folder <> '')
{
if (file_exists($_SERVER["DOCUMENT_ROOT"].$this->__folder."/result_modifier.php"))
{
include($_SERVER["DOCUMENT_ROOT"].$this->__folder."/result_modifier.php");
}
}
}
/**
* @return void
* @internal
*/
public function __IncludeCSSFile()
{
/** @global CMain $APPLICATION */
global $APPLICATION;
if ($this->__folder <> '')
{
if (
$this->__hasCSS
|| file_exists($_SERVER["DOCUMENT_ROOT"].$this->__folder."/style.css")
)
{
Arguments
"/home/bitrix/www/local/templates/sotbit_origami/components/bitrix/catalog.element/.default/result_modifier.php"
/home/bitrix/www/bitrix/modules/main/classes/general/component_template.php
if (!$this->__bInited)
return false;
$arLangMessages = null;
$externalEngine = ($arBXAvailableTemplateEngines[$this->__engineID]["function"] <> '' && function_exists($arBXAvailableTemplateEngines[$this->__engineID]["function"]));
$arParams = $this->__component->arParams;
if($this->__folder <> '')
{
if ($externalEngine)
{
$arLangMessages = $this->IncludeLangFile("", false, true);
}
else
{
$this->IncludeLangFile();
}
$this->__IncludeMutatorFile($arResult, $arParams);
if (!isset($this->__hasCSS) || $this->__hasCSS)
$this->__IncludeCSSFile();
if (!isset($this->__hasJS) || $this->__hasJS)
$this->__IncludeJSFile();
}
$parentTemplateFolder = "";
$parentComponent = $this->__component->GetParent();
if ($parentComponent)
{
$parentTemplate = $parentComponent->GetTemplate();
if ($parentTemplate)
$parentTemplateFolder = $parentTemplate->GetFolder();
}
if ($externalEngine)
{
$result = call_user_func(
$arBXAvailableTemplateEngines[$this->__engineID]["function"],
$this->__file,
/home/bitrix/www/bitrix/modules/main/classes/general/component.php
$this->__template->setLanguageId($this->getLanguageId());
if ($this->__template->Init($this, $siteTemplate, $customTemplatePath))
return true;
else
return false;
}
/**
* Function executes initialized template of the component.
*
* <p>Note: component must be inited by initComponent method.</p>
* @return void
*
*/
final public function showComponentTemplate()
{
if (!$this->__bInited)
return null;
if ($this->__template)
$this->__template->includeTemplate($this->arResult);
if(is_array($this->arResultCacheKeys))
{
$arNewResult = array();
foreach($this->arResultCacheKeys as $key)
if(array_key_exists($key, $this->arResult))
$arNewResult[$key] = $this->arResult[$key];
$this->arResult = $arNewResult;
}
if(!empty($this->__editButtons))
{
foreach($this->__editButtons as $button)
{
if($button[0] == 'AddEditAction')
$this->addEditAction($button[1], $button[2], $button[3], $button[4]);
else
$this->addDeleteAction($button[1], $button[2], $button[3], $button[4]);
}
}
/home/bitrix/www/bitrix/modules/main/classes/general/component.php
return $result;
}
/**
* Function executes the template.
*
* <p>Note: component must be inited by initComponent method.</p>
* @param string $templatePage
* @param string $customTemplatePath
* @return void
*
*/
final public function includeComponentTemplate($templatePage = "", $customTemplatePath = "")
{
if (!$this->__bInited)
return null;
if ($this->initComponentTemplate($templatePage, $this->getSiteTemplateId(), $customTemplatePath))
{
$this->showComponentTemplate();
if($this->__component_epilog)
$this->includeComponentEpilog($this->__component_epilog);
}
else
{
$this->abortResultCache();
$this->__showError(str_replace(
array("#PAGE#", "#NAME#"),
array($templatePage, $this->getTemplateName()),
"Cannot find '#NAME#' template with page '#PAGE#'"
));
}
$this->__template->__component = null;
}
/**
* Function initializes the template of the component. Returns true on success.
*
* <p>Instansiates the template object and calls it's init function.</p>
* <p>Note: component must be inited by initComponent method.</p>
* @param string $templatePage
/home/bitrix/www/bitrix/modules/iblock/lib/component/base.php
/**
* Show cached component data or load if outdated.
* If extended mode enabled - uses result_modifier.php logic in component (be careful not to duplicate it).
*/
protected function loadData()
{
if ($this->isCacheDisabled() || $this->startResultCache(false, $this->getAdditionalCacheId(), $this->getComponentCachePath()))
{
$this->processResultData();
if (!$this->hasErrors())
{
if ($this->isExtendedMode())
{
$this->initComponentTemplate();
$this->applyTemplateModifications();
}
$this->initResultCache();
$this->includeComponentTemplate();
$this->clearCatalogDiscountCache();
}
}
}
/**
* Return component cache identifier.
*
* @return mixed
*/
abstract protected function getAdditionalCacheId();
/**
* Return component cache path.
*
* @return mixed
*/
abstract protected function getComponentCachePath();
public function getTemplateEmptyPreview()
/home/bitrix/www/bitrix/modules/iblock/lib/component/base.php
* Mark last usage of BigData.
*/
protected function initBigDataLastUsage()
{
$lastUsage = Main\Config\Option::get('main', 'rcm_component_usage', 0);
if ($lastUsage == 0 || (time() - $lastUsage) > 3600)
{
Main\Config\Option::set('main', 'rcm_component_usage', time());
}
}
/**
* This method executes when "initialLoad" action is chosen.
*/
protected function initialLoadAction()
{
$this->productIds = $this->getProductIds();
$this->productIdMap = $this->getProductIdMap($this->productIds);
$this->loadData();
}
/**
* Show cached component data or load if outdated.
* If extended mode enabled - uses result_modifier.php logic in component (be careful not to duplicate it).
*/
protected function loadData()
{
if ($this->isCacheDisabled() || $this->startResultCache(false, $this->getAdditionalCacheId(), $this->getComponentCachePath()))
{
$this->processResultData();
if (!$this->hasErrors())
{
if ($this->isExtendedMode())
{
$this->initComponentTemplate();
$this->applyTemplateModifications();
}
$this->initResultCache();
/home/bitrix/www/bitrix/modules/iblock/lib/component/element.php
'OFFERS_PROPERTY_CODE' => $params['OFFERS_PROPERTY_CODE'],
'OFFERS_CART_PROPERTIES' => $offersCartProperties,
'OFFERS_TREE_PROPS' => $offerTreeProperties
)
);
}
protected function checkModules()
{
if ($success = parent::checkModules())
{
$this->storage['MODULES']['workflow'] = false;
}
return $success;
}
protected function initialLoadAction()
{
parent::initialLoadAction();
if (!$this->hasErrors() && isset($this->arResult['ID']))
{
$this->initAdminIconsPanel();
$this->sendCounters();
$this->saveViewedProduct();
$this->initMetaData();
}
}
protected function processResultData()
{
if ($this->checkElementId())
{
parent::processResultData();
$this->arResult['IS_FACEBOOK_CONVERSION_CUSTOMIZE_PRODUCT_EVENT_ENABLED'] = false;
if (Loader::includeModule('sale'))
{
$this->arResult['IS_FACEBOOK_CONVERSION_CUSTOMIZE_PRODUCT_EVENT_ENABLED'] = FacebookConversion::isEventEnabled(
'CustomizeProduct'
/home/bitrix/www/bitrix/modules/iblock/lib/component/base.php
$action = $this->request->get('bigData') === 'Y' ? 'bigDataLoad' : 'deferredLoad';
}
else
{
$action = 'initialLoad';
}
return $action;
}
/**
* Action executor.
*/
protected function doAction()
{
$action = $this->getAction();
if (is_callable(array($this, $action.'Action')))
{
call_user_func(array($this, $action.'Action'));
}
}
/**
* @return int|false
*/
public function executeComponent()
{
$this->checkModules();
if ($this->hasErrors())
{
return $this->processErrors();
}
$action = $this->prepareAction();
$this->setAction($action);
$this->doAction();
if ($this->hasErrors())
/home/bitrix/www/bitrix/modules/iblock/lib/component/base.php
$action = $this->request->get('bigData') === 'Y' ? 'bigDataLoad' : 'deferredLoad';
}
else
{
$action = 'initialLoad';
}
return $action;
}
/**
* Action executor.
*/
protected function doAction()
{
$action = $this->getAction();
if (is_callable(array($this, $action.'Action')))
{
call_user_func(array($this, $action.'Action'));
}
}
/**
* @return int|false
*/
public function executeComponent()
{
$this->checkModules();
if ($this->hasErrors())
{
return $this->processErrors();
}
$action = $this->prepareAction();
$this->setAction($action);
$this->doAction();
if ($this->hasErrors())
/home/bitrix/www/bitrix/modules/iblock/lib/component/base.php
{
call_user_func(array($this, $action.'Action'));
}
}
/**
* @return int|false
*/
public function executeComponent()
{
$this->checkModules();
if ($this->hasErrors())
{
return $this->processErrors();
}
$action = $this->prepareAction();
$this->setAction($action);
$this->doAction();
if ($this->hasErrors())
{
return $this->processErrors();
}
return $this->arResult['ID'] ?? false;
}
/**
* Returns prepared all component parameters after verify template parameters .
*
* @return array
*/
public function applyTemplateModifications()
{
$this->prepareTemplateParams();
$this->checkTemplateTheme();
$this->editTemplateData();
/home/bitrix/www/bitrix/modules/main/classes/general/component.php
$keysToExport = $component->listKeysSignedParameters();
if($keysToExport)
{
$component->storeSignedParameters(array_intersect_key($arParams, array_combine($keysToExport, $keysToExport)));
}
$component->arParams = $component->onPrepareComponentParams($arParams);
$component->__prepareComponentParams($component->arParams);
$componentFrame = new \Bitrix\Main\Composite\Internals\AutomaticArea($component);
$componentFrame->start();
if($returnResult)
{
$component->executeComponent();
$result = $component->arResult;
}
else
{
$result = $component->executeComponent();
}
$this->__arIncludeAreaIcons = $component->__arIncludeAreaIcons;
$frameMode = $component->getFrameMode();
$componentFrame->end();
}
else
{
$this->includeComponentLang();
$this->__prepareComponentParams($arParams);
$this->arParams = $arParams;
$componentFrame = new \Bitrix\Main\Composite\Internals\AutomaticArea($this);
$componentFrame->start();
if($returnResult)
{
$this->__IncludeComponent();
$result = $this->arResult;
/home/bitrix/www/bitrix/modules/main/classes/general/main.php
{
echo $this->IncludeStringBefore();
}
$result = null;
$bComponentEnabled = (!isset($arFunctionParams["ACTIVE_COMPONENT"]) || $arFunctionParams["ACTIVE_COMPONENT"] <> "N");
$component = new CBitrixComponent();
if ($component->InitComponent($componentName))
{
$obAjax = null;
if ($bComponentEnabled)
{
if (($arParams['AJAX_MODE'] ?? '') == 'Y')
{
$obAjax = new CComponentAjax($componentName, $componentTemplate, $arParams, $parentComponent);
}
$this->__componentStack[] = $component;
$result = $component->IncludeComponent($componentTemplate, $arParams, $parentComponent, $returnResult);
array_pop($this->__componentStack);
}
if ($bDrawIcons)
{
$panel = new CComponentPanel($component, $componentName, $componentTemplate, $parentComponent, $bComponentEnabled);
$arIcons = $panel->GetIcons();
echo $this->IncludeStringAfter($arIcons["icons"], $arIcons["parameters"]);
}
if ($bComponentEnabled && $obAjax)
{
$obAjax->Process();
}
}
if ($bShowDebug)
{
/home/bitrix/www/local/templates/sotbit_origami/components/bitrix/catalog/sotbit_origami_catalog_equipment/element_detail.php
]);
if (in_array($sectionIdByCode, $arSectionsMain)) {
$templateName = "";
$template = "";
} else if (in_array($sectionIdByCode, $arSectionsNoTabs)) {
$templateName = "origami_no_tabs";
$template = "NO_TABS";
} else {
if (\Sotbit\Origami\Config\Option::get('DETAIL_TEMPLATE') == "") {
$templateName = "";
$template = "";
} else if (\Sotbit\Origami\Config\Option::get('DETAIL_TEMPLATE') == "NO_TABS") {
$templateName = "origami_no_tabs";
$template = "NO_TABS";
}
}
$elementId = $APPLICATION->IncludeComponent(
'bitrix:catalog.element',
$templateName,
$componentElementParams,
$component
);
\SotbitOrigami::setSeoOffer();
$GLOBALS['CATALOG_CURRENT_ELEMENT_ID'] = $elementId;
if ($elementId > 0) {
//////analog/////
$showCrosssell = (\Sotbit\Origami\Config\Option::get('SHOW_CROSSSELL_' . $template));
if (!in_array($showCrosssell, array('Y', 'N'))) {
$showCrosssell = 'N';
}
if ($showCrosssell == 'Y') {
$APPLICATION->IncludeComponent(
"sotbit:crosssell.crosssell.list",
/home/bitrix/www/local/templates/sotbit_origami/components/bitrix/catalog/sotbit_origami_catalog_equipment/element.php
if (isset($arParams['USER_CONSENT_IS_CHECKED'])) {
$componentElementParams['USER_CONSENT_IS_CHECKED']
= $arParams['USER_CONSENT_IS_CHECKED'];
}
if (isset($arParams['USER_CONSENT_IS_LOADED'])) {
$componentElementParams['USER_CONSENT_IS_LOADED']
= $arParams['USER_CONSENT_IS_LOADED'];
}
if(isset($_REQUEST['preview']) && $_REQUEST['preview'] == 'Y')
{
$APPLICATION->RestartBuffer();
include($_SERVER["DOCUMENT_ROOT"]."/".$this->GetFolder()."/element_preview.php");
die();
}
else
{
include($_SERVER["DOCUMENT_ROOT"]."/".$this->GetFolder()."/element_detail.php");
}
?>
Arguments
"/home/bitrix/www/local/templates/sotbit_origami/components/bitrix/catalog/sotbit_origami_catalog_equipment/element_detail.php"
/home/bitrix/www/local/templates/sotbit_origami/components/bitrix/catalog/sotbit_origami_catalog_equipment/section.php
$arSelect = array('ID', 'XML_ID');
$rsSect = CIBlockSection::GetList(array('left_margin' => 'asc'), $arFilter, false, $arSelect);
while ($arSect = $rsSect->GetNext()) {
$arrFilterSectionID[] = $arSect['ID'];
}
}
$cache->endDataCache(array('section_name' => $section_name, 'arrFilterSectionID' => $arrFilterSectionID));
}
/*?><pre><?print_r($arrFilterSectionID)?></pre><?*/
if($section_name) {
$APPLICATION->SetTitle($section_name);
}
if($_REQUEST['el']){
$arResult['ELEMENT_CODE'] = $_REQUEST['el'];
include($_SERVER["DOCUMENT_ROOT"]."/".$this->GetFolder()."/element.php");
}
else {
${$arParams["FILTER_NAME"]}['PROPERTY_ALTERNATIVNAYA_IERARKHIYA'] = $arrFilterSectionID;
/*?><pre><?print_r(${$arParams["FILTER_NAME"]})?></pre><?*/
if ($isVerticalFilter) {
include($_SERVER["DOCUMENT_ROOT"] . "/" . $this->GetFolder() . "/section_vertical.php");
} else {
include($_SERVER["DOCUMENT_ROOT"] . "/" . $this->GetFolder() . "/section_horizontal.php");
}
}
global $sotbitSeoMetaTitle;
global $sotbitSeoMetaKeywords;
global $sotbitSeoMetaDescription;
global $sotbitSeoMetaH1;
if (isset($sotbitSeoMetaTitle) && !empty($sotbitSeoMetaTitle)) {
$APPLICATION->SetPageProperty('title', $sotbitSeoMetaTitle);
}
if (isset($sotbitSeoMetaKeywords) && !empty($sotbitSeoMetaKeywords)) {
Arguments
"/home/bitrix/www/local/templates/sotbit_origami/components/bitrix/catalog/sotbit_origami_catalog_equipment/element.php"
/home/bitrix/www/bitrix/modules/main/classes/general/component_template.php
/** @noinspection PhpUnusedLocalVariableInspection */
$templateName = $this->__name;
/** @noinspection PhpUnusedLocalVariableInspection */
$templateFile = $this->__file;
/** @noinspection PhpUnusedLocalVariableInspection */
$templateFolder = $this->__folder;
/** @noinspection PhpUnusedLocalVariableInspection */
$componentPath = $this->__component->GetPath();
$component = &$this->__component;
if ($this->__fileAlt <> '')
{
include($_SERVER["DOCUMENT_ROOT"].$this->__fileAlt);
return null;
}
$templateData = false;
include($_SERVER["DOCUMENT_ROOT"].$this->__file);
for ($i = count($this->frames) - 1; $i >= 0; $i--)
{
$frame = $this->frames[$i];
if ($frame->isStarted() && !$frame->isEnded())
{
$frame->end();
}
}
if (!$this->getFrameMode())
{
$page = \Bitrix\Main\Composite\Page::getInstance();
$page->giveNegativeComponentVote($this->__file);
}
$component_epilog = $this->__folder."/component_epilog.php";
if(file_exists($_SERVER["DOCUMENT_ROOT"].$component_epilog))
{
//These will be available with extract then component will
Arguments
"/home/bitrix/www/local/templates/sotbit_origami/components/bitrix/catalog/sotbit_origami_catalog_equipment/section.php"
/home/bitrix/www/bitrix/modules/main/classes/general/component_template.php
if ($parentTemplate)
$parentTemplateFolder = $parentTemplate->GetFolder();
}
if ($externalEngine)
{
$result = call_user_func(
$arBXAvailableTemplateEngines[$this->__engineID]["function"],
$this->__file,
$arResult,
$arParams,
$arLangMessages,
$this->__folder,
$parentTemplateFolder,
$this
);
}
else
{
$result = $this->__IncludePHPTemplate($arResult, $arParams, $parentTemplateFolder);
}
return $result;
}
/**
* Includes template language file.
*
* @param string $relativePath
* @param false|string $lang
* @param boolean $return
*
* @return array
*/
public function IncludeLangFile($relativePath = "", $lang = false, $return = false)
{
$arLangMessages = array();
if($this->__folder <> '')
{
/home/bitrix/www/bitrix/modules/main/classes/general/component.php
$this->__template->setLanguageId($this->getLanguageId());
if ($this->__template->Init($this, $siteTemplate, $customTemplatePath))
return true;
else
return false;
}
/**
* Function executes initialized template of the component.
*
* <p>Note: component must be inited by initComponent method.</p>
* @return void
*
*/
final public function showComponentTemplate()
{
if (!$this->__bInited)
return null;
if ($this->__template)
$this->__template->includeTemplate($this->arResult);
if(is_array($this->arResultCacheKeys))
{
$arNewResult = array();
foreach($this->arResultCacheKeys as $key)
if(array_key_exists($key, $this->arResult))
$arNewResult[$key] = $this->arResult[$key];
$this->arResult = $arNewResult;
}
if(!empty($this->__editButtons))
{
foreach($this->__editButtons as $button)
{
if($button[0] == 'AddEditAction')
$this->addEditAction($button[1], $button[2], $button[3], $button[4]);
else
$this->addDeleteAction($button[1], $button[2], $button[3], $button[4]);
}
}
/home/bitrix/www/bitrix/modules/main/classes/general/component.php
return $result;
}
/**
* Function executes the template.
*
* <p>Note: component must be inited by initComponent method.</p>
* @param string $templatePage
* @param string $customTemplatePath
* @return void
*
*/
final public function includeComponentTemplate($templatePage = "", $customTemplatePath = "")
{
if (!$this->__bInited)
return null;
if ($this->initComponentTemplate($templatePage, $this->getSiteTemplateId(), $customTemplatePath))
{
$this->showComponentTemplate();
if($this->__component_epilog)
$this->includeComponentEpilog($this->__component_epilog);
}
else
{
$this->abortResultCache();
$this->__showError(str_replace(
array("#PAGE#", "#NAME#"),
array($templatePage, $this->getTemplateName()),
"Cannot find '#NAME#' template with page '#PAGE#'"
));
}
$this->__template->__component = null;
}
/**
* Function initializes the template of the component. Returns true on success.
*
* <p>Instansiates the template object and calls it's init function.</p>
* <p>Note: component must be inited by initComponent method.</p>
* @param string $templatePage
/home/bitrix/www/bitrix/components/bitrix/catalog/component.php
$currentPage = htmlspecialcharsbx($APPLICATION->GetCurPage())."?";
$arResult = array(
"FOLDER" => "",
"URL_TEMPLATES" => array(
"section" => $currentPage.$arVariableAliases["SECTION_ID"]."=#SECTION_ID#",
"element" => $currentPage.$arVariableAliases["SECTION_ID"]."=#SECTION_ID#"."&".$arVariableAliases["ELEMENT_ID"]."=#ELEMENT_ID#",
"compare" => $currentPage."action=COMPARE",
),
"VARIABLES" => $arVariables,
"ALIASES" => $arVariableAliases
);
}
$arResult["VARIABLES"]["SMART_FILTER_PATH"] ??= '';
$arResult["VARIABLES"]["SECTION_ID"] ??= 0;
$arResult["VARIABLES"]["SECTION_CODE"] ??= '';
$arResult['VARIABLES']['ELEMENT_ID'] ??= 0;
$arResult['VARIABLES']['ELEMENT_CODE'] ??= '';
$this->IncludeComponentTemplate($componentPage);
/home/bitrix/www/bitrix/modules/main/classes/general/component.php
$arResult = &$this->arResult;
$componentPath = $this->__path;
$componentName = $this->__name;
$componentTemplate = $this->getTemplateName();
if ($this->__parent)
{
$parentComponentName = $this->__parent->__name;
$parentComponentPath = $this->__parent->__path;
$parentComponentTemplate = $this->__parent->getTemplateName();
}
else
{
$parentComponentName = "";
$parentComponentPath = "";
$parentComponentTemplate = "";
}
return include($_SERVER["DOCUMENT_ROOT"].$this->__path."/component.php");
}
/**
* Function executes the component. Returns the result of it's execution.
*
* <p>Note: component must be inited by initComponent method.</p>
* @param string $componentTemplate
* @param array $arParams
* @param CBitrixComponent|null $parentComponent
* @return mixed
*
*/
final public function includeComponent($componentTemplate, $arParams, $parentComponent, $returnResult = false)
{
if (!$this->__bInited)
return null;
if ($componentTemplate !== false)
$this->setTemplateName($componentTemplate);
if ($parentComponent instanceof cbitrixcomponent)
Arguments
"/home/bitrix/www/bitrix/components/bitrix/catalog/component.php"
/home/bitrix/www/bitrix/modules/main/classes/general/component.php
$componentFrame->end();
}
else
{
$this->includeComponentLang();
$this->__prepareComponentParams($arParams);
$this->arParams = $arParams;
$componentFrame = new \Bitrix\Main\Composite\Internals\AutomaticArea($this);
$componentFrame->start();
if($returnResult)
{
$this->__IncludeComponent();
$result = $this->arResult;
}
else
{
$result = $this->__IncludeComponent();
}
$frameMode = $this->getFrameMode();
$componentFrame->end();
}
if (!$frameMode)
{
$page = \Bitrix\Main\Composite\Page::getInstance();
$page->giveNegativeComponentVote($this->__name);
}
return $result;
}
/**
* Function executes the template.
*
* <p>Note: component must be inited by initComponent method.</p>
* @param string $templatePage
/home/bitrix/www/bitrix/modules/main/classes/general/main.php
{
echo $this->IncludeStringBefore();
}
$result = null;
$bComponentEnabled = (!isset($arFunctionParams["ACTIVE_COMPONENT"]) || $arFunctionParams["ACTIVE_COMPONENT"] <> "N");
$component = new CBitrixComponent();
if ($component->InitComponent($componentName))
{
$obAjax = null;
if ($bComponentEnabled)
{
if (($arParams['AJAX_MODE'] ?? '') == 'Y')
{
$obAjax = new CComponentAjax($componentName, $componentTemplate, $arParams, $parentComponent);
}
$this->__componentStack[] = $component;
$result = $component->IncludeComponent($componentTemplate, $arParams, $parentComponent, $returnResult);
array_pop($this->__componentStack);
}
if ($bDrawIcons)
{
$panel = new CComponentPanel($component, $componentName, $componentTemplate, $parentComponent, $bComponentEnabled);
$arIcons = $panel->GetIcons();
echo $this->IncludeStringAfter($arIcons["icons"], $arIcons["parameters"]);
}
if ($bComponentEnabled && $obAjax)
{
$obAjax->Process();
}
}
if ($bShowDebug)
{
/home/bitrix/www/catalog/equipment/index.php
1 => "",
),
"MOBILE_VIEW_MINIMAL" => "ADMIN",
"STORES_MAP" => "YANDEX",
"SECTIONS_ROOT_VIEW" => "1",
"CURRENCY_ID" => "RUB",
"SEF_URL_TEMPLATES" => array(
"sections" => "/catalog/equipment/",
"section" => "#SECTION_CODE_PATH#/",
"element" => "#SECTION_CODE_PATH#/?el=#ELEMENT_ID#",
"compare" => "compare/",
"smart_filter" => "#SECTION_CODE_PATH#/filter/#SMART_FILTER_PATH#/apply/",
),
"VARIABLE_ALIASES" => array(
"element" => array(
"ELEMENT_ID" => "el",
),
)
),
false
);
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");
?>
/home/bitrix/www/bitrix/modules/main/include/urlrewrite.php
}
$ext = strtolower(GetFileExtension($url));
if ($ext != "php")
{
continue;
}
// D7 response is not available here
if (stristr(php_sapi_name(), "cgi") !== false && (!defined("BX_HTTP_STATUS") || !BX_HTTP_STATUS))
{
header("Status: 200 OK");
}
else
{
header($_SERVER["SERVER_PROTOCOL"] . " 200 OK");
}
$_SERVER["REAL_FILE_PATH"] = $url;
include_once $io->GetPhysicalName($_SERVER['DOCUMENT_ROOT'] . $url);
die();
}
}
}
//admin section 404
if (str_starts_with($requestUri, "/bitrix/admin/"))
{
$_SERVER["REAL_FILE_PATH"] = "/bitrix/admin/404.php";
include $_SERVER["DOCUMENT_ROOT"] . "/bitrix/admin/404.php";
die();
}
define("BX_CHECK_SHORT_URI", true);
Arguments
"/home/bitrix/www/catalog/equipment/index.php"
/home/bitrix/www/bitrix/urlrewrite.php
<?
include_once($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/urlrewrite.php');
if(file_exists($_SERVER['DOCUMENT_ROOT'].'/404.php'))
include_once($_SERVER['DOCUMENT_ROOT'].'/404.php');
?>
Arguments
"/home/bitrix/www/bitrix/modules/main/include/urlrewrite.php"