BX('yandex_title_content').innerHTML = BX.util.htmlspecialchars(title||BX('title_content').placeholder); BX('yandex_text_content').innerHTML = BX.util.htmlspecialchars(text||BX('text_content').placeholder).replace(/\n+/g, ' '); BX('yandex_link_content').innerHTML = BX.util.htmlspecialchars(domain); BX('yandex_link_content_link').innerHTML = BX.util.htmlspecialchars(domain); BX('yandex_link').href = link; BX('yandex_link_content_link').href = link; } BX.ready(updateAdv); </script> <? // geo tab $tabControl->BeginNextTab(); $dbRes = Adv\YandexRegionTable::getList(array( 'order' => array('PARENT_XML_ID' => 'ASC'), 'select' => array('ID', 'NAME', 'XML_ID', 'PARENT_ID', 'PARENT_XML_ID' => 'PARENT.XML_ID') )); $regions = array(); $regionsOutput = array(); while($region = $dbRes->fetch()) { $regionsOutput[$region['PARENT_XML_ID']] = ''; $regions[] = $region; } foreach($regions as $region) { $bHasChildren = isset($regionsOutput[$region["XML_ID"]]); $bHasParent = $region['PARENT_XML_ID'] !== null;
function UnInstallDB($arParams = array()) { global $APPLICATION, $DB, $errors; $this->errors = false; if (!$arParams['savedata']) { $this->errors = $DB->RunSQLBatch($_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/seo/install/db/" . strtolower($DB->type) . "/uninstall.sql"); if (empty($this->errors)) { \Bitrix\Seo\Adv\YandexRegionTable::setLastUpdate(0); } } if (!empty($this->errors)) { $APPLICATION->ThrowException(implode("", $this->errors)); return false; } require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/seo/install/tasks/uninstall.php"; $eventManager = \Bitrix\Main\EventManager::getInstance(); $eventManager->unRegisterEventHandler('main', 'OnPanelCreate', 'seo'); $eventManager->unRegisterEventHandler("fileman", "OnIncludeHTMLEditorScript", "seo"); $eventManager->unRegisterEventHandler("fileman", "OnBeforeHTMLEditorScriptRuns", "seo", "CSeoEventHandlers", "OnBeforeHTMLEditorScriptRuns"); $eventManager->unRegisterEventHandler("iblock", "OnAfterIBlockSectionAdd", "seo", "\\Bitrix\\Seo\\SitemapIblock", "addSection"); $eventManager->unRegisterEventHandler("iblock", "OnAfterIBlockElementAdd", "seo", "\\Bitrix\\Seo\\SitemapIblock", "addElement"); $eventManager->unRegisterEventHandler("iblock", "OnBeforeIBlockSectionDelete", "seo", "\\Bitrix\\Seo\\SitemapIblock", "beforeDeleteSection"); $eventManager->unRegisterEventHandler("iblock", "OnBeforeIBlockElementDelete", "seo", "\\Bitrix\\Seo\\SitemapIblock", "beforeDeleteElement"); $eventManager->unRegisterEventHandler("iblock", "OnAfterIBlockSectionDelete", "seo", "\\Bitrix\\Seo\\SitemapIblock", "deleteSection"); $eventManager->unRegisterEventHandler("iblock", "OnAfterIBlockElementDelete", "seo", "\\Bitrix\\Seo\\SitemapIblock", "deleteElement"); $eventManager->unRegisterEventHandler("iblock", "OnBeforeIBlockSectionUpdate", "seo", "\\Bitrix\\Seo\\SitemapIblock", "beforeUpdateSection"); $eventManager->unRegisterEventHandler("iblock", "OnBeforeIBlockElementUpdate", "seo", "\\Bitrix\\Seo\\SitemapIblock", "beforeUpdateElement"); $eventManager->unRegisterEventHandler("iblock", "OnAfterIBlockSectionUpdate", "seo", "\\Bitrix\\Seo\\SitemapIblock", "updateSection"); $eventManager->unRegisterEventHandler("iblock", "OnAfterIBlockElementUpdate", "seo", "\\Bitrix\\Seo\\SitemapIblock", "updateElement"); $eventManager->unRegisterEventHandler("forum", "onAfterTopicAdd", "seo", "\\Bitrix\\Seo\\SitemapForum", "addTopic"); $eventManager->unRegisterEventHandler("forum", "onAfterTopicUpdate", "seo", "\\Bitrix\\Seo\\SitemapForum", "updateTopic"); $eventManager->unRegisterEventHandler("forum", "onAfterTopicDelete", "seo", "\\Bitrix\\Seo\\SitemapForum", "deleteTopic"); $eventManager->unRegisterEventHandler("main", "OnAdminIBlockElementEdit", "seo", "\\Bitrix\\Seo\\AdvTabEngine", "eventHandler"); $eventManager->unRegisterEventHandler("main", "OnBeforeProlog", "seo", "\\Bitrix\\Seo\\AdvSession", "checkSession"); $eventManager->unRegisterEventHandler("sale", "OnOrderSave", "seo", "\\Bitrix\\Seo\\AdvSession", "onOrderSave"); $eventManager->unRegisterEventHandler("sale", "OnBasketOrder", "seo", "\\Bitrix\\Seo\\AdvSession", "onBasketOrder"); $eventManager->unRegisterEventHandler("sale", "onSalePayOrder", "seo", "\\Bitrix\\Seo\\AdvSession", "onSalePayOrder"); $eventManager->unRegisterEventHandler("sale", "onSaleDeductOrder", "seo", "\\Bitrix\\Seo\\AdvSession", "onSaleDeductOrder"); $eventManager->unRegisterEventHandler("sale", "onSaleDeliveryOrder", "seo", "\\Bitrix\\Seo\\AdvSession", "onSaleDeliveryOrder"); $eventManager->unRegisterEventHandler("sale", "onSaleStatusOrder", "seo", "\\Bitrix\\Seo\\AdvSession", "onSaleStatusOrder"); $eventManager->unRegisterEventHandler("conversion", "OnSetDayContextAttributes", "seo", "\\Bitrix\\Seo\\ConversionHandler", "onSetDayContextAttributes"); $eventManager->unRegisterEventHandler("conversion", "OnGetAttributeTypes", "seo", "\\Bitrix\\Seo\\ConversionHandler", "onGetAttributeTypes"); $eventManager->unRegisterEventHandler("catalog", "OnProductUpdate", "seo", "\\Bitrix\\Seo\\Adv\\Auto", "checkQuantity"); $eventManager->unRegisterEventHandler("catalog", "OnProductSetAvailableUpdate", "seo", "\\Bitrix\\Seo\\Adv\\Auto", "checkQuantity"); UnRegisterModule("seo"); return true; }