$arComponent = PHPParser::FindComponent($componentName, $filesrc, $src_line); if ($arComponent === false) { $strWarning .= GetMessage("comp_prop_err_comp") . "<br>"; } else { $arValues = $arComponent["DATA"]["PARAMS"]; } } } if ($strWarning == "") { if ($_SERVER["REQUEST_METHOD"] == "POST" && $_GET["action"] == "refresh") { // parameters were changed by "ok" button // we need to refresh the component description with new values $arValues = array_merge($arValues, $_POST); } $curTemplate = isset($_POST["COMPONENT_TEMPLATE"]) ? $_POST["COMPONENT_TEMPLATE"] : $componentTemplate; $data = CComponentParamsManager::GetComponentProperties($componentName, $curTemplate, $templateId, $arValues); $data['description'] = CComponentUtil::GetComponentDescr($componentName); /* save parameters to file */ if ($_SERVER["REQUEST_METHOD"] == "POST" && $_GET["action"] == "save" && $arComponent !== false) { if (!check_bitrix_sessid()) { $strWarning .= GetMessage("comp_prop_err_save") . "<br>"; } else { $aPostValues = array_merge($arValues, $_POST); unset($aPostValues["sessid"]); unset($aPostValues["bxpiheight"]); unset($aPostValues["bxpiwidth"]); CComponentUtil::PrepareVariables($aPostValues); foreach ($aPostValues as $name => $value) { if (is_array($value) && count($value) == 1 && isset($value[0]) && $value[0] == "") { $aPostValues[$name] = array(); } elseif ($bLimitPhpAccess && substr($value, 0, 2) == '={' && substr($value, -1) == '}') {