function InstallDB() { global $DB, $APPLICATION; $this->errors = false; if (!$DB->Query("SELECT 'x' FROM b_im_chat", true)) { $this->errors = $DB->RunSQLBatch($_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/im/install/db/" . strtolower($DB->type) . "/install.sql"); } if ($this->errors !== false) { $APPLICATION->ThrowException(implode("", $this->errors)); return false; } RegisterModule("im"); RegisterModuleDependences('main', 'OnAddRatingVote', 'im', 'CIMEvent', 'OnAddRatingVote'); RegisterModuleDependences('main', 'OnCancelRatingVote', 'im', 'CIMEvent', 'OnCancelRatingVote'); RegisterModuleDependences('main', 'OnAfterUserUpdate', 'im', 'CIMEvent', 'OnAfterUserUpdate'); RegisterModuleDependences('main', 'OnUserDelete', 'im', 'CIMEvent', 'OnUserDelete'); RegisterModuleDependences("pull", "OnGetDependentModule", "im", "CIMEvent", "OnGetDependentModule"); RegisterModuleDependences("main", "OnProlog", "main", "", "", 3, "/modules/im/ajax_hit.php"); RegisterModuleDependences("perfmon", "OnGetTableSchema", "im", "CIMTableSchema", "OnGetTableSchema"); RegisterModuleDependences("im", "OnGetNotifySchema", "im", "CIMNotifySchema", "OnGetNotifySchema"); RegisterModuleDependences("main", "OnFileDelete", "im", "CIMEvent", "OnFileDelete"); RegisterModuleDependences("main", "OnApplicationsBuildList", "im", "DesktopApplication", "OnApplicationsBuildList"); CAgent::AddAgent("CIMMail::MailNotifyAgent();", "im", "N", 600); CAgent::AddAgent("CIMMail::MailMessageAgent();", "im", "N", 600); CAgent::AddAgent("CIMDisk::RemoveTmpFileAgent();", "im", "N", 43200); CModule::IncludeModule("im"); if (CIMConvert::ConvertCount() > 0) { Cmodule::IncludeModule("im"); CAdminNotify::Add(array("MESSAGE" => GetMessage("IM_CONVERT_MESSAGE", array("#A_TAG_START#" => '<a href="/bitrix/admin/im_convert.php?lang=' . LANGUAGE_ID . '">', "#A_TAG_END#" => "</a>")), "TAG" => "IM_CONVERT", "MODULE_ID" => "IM", "ENABLE_CLOSE" => "Y")); CAgent::AddAgent("CIMConvert::UndeliveredMessageAgent();", "im", "N", 20, "", "Y", ConvertTimeStamp(time() + CTimeZone::GetOffset() + 20, "FULL")); } return true; }
/** * * @param string &$content * @return void * */ public function OnEndBufferContent(&$content) { if (isset($_GET["nocdn"])) { return; } self::$proto = CMain::IsHTTPS() ? "https" : "http"; self::$config = CBitrixCloudCDNConfig::getInstance()->loadFromOptions(); if (self::$config->isExpired()) { if (self::$config->lock()) { try { try { $delayExpiration = true; self::$config = CBitrixCloudCDNConfig::getInstance()->loadRemoteXML(); self::$config->saveToOptions(); self::$config->unlock(); } catch (CBitrixCloudException $e) { //In case of documented XML error we'll disable CDN if ($e->getErrorCode() !== "") { self::SetActive(false); $delayExpiration = false; } throw $e; } } catch (exception $e) { if ($delayExpiration) { self::$config->setExpired(time() + 1800); } CAdminNotify::Add(array("MESSAGE" => GetMessage("BCL_CDN_NOTIFY", array("#HREF#" => "/bitrix/admin/bitrixcloud_cdn.php?lang=" . LANGUAGE_ID)), "TAG" => "bitrixcloud_off", "MODULE_ID" => "bitrixcloud", "ENABLE_CLOSE" => "Y")); self::$config->unlock(); return; } } } if (!self::$config->isActive()) { return false; } $sites = self::$config->getSites(); if (defined("ADMIN_SECTION")) { if (!isset($sites["admin"])) { return; } } elseif (defined("SITE_ID")) { if (!isset($sites[SITE_ID])) { return; } } else { return; } self::$ajax = preg_match("/<head>/i", substr($content, 0, 512)) === 0; $arPrefixes = array_map(array("CBitrixCloudCDN", "_preg_quote"), self::$config->getLocationsPrefixes()); $arExtensions = array_map(array("CBitrixCloudCDN", "_preg_quote"), self::$config->getLocationsExtensions()); if (!empty($arPrefixes) && !empty($arExtensions)) { $prefix_regex = "(?:" . implode("|", $arPrefixes) . ")"; $extension_regex = "(?:" . implode("|", $arExtensions) . ")"; $regex = "/\n\t\t\t\t((?i:\n\t\t\t\t\thref=\n\t\t\t\t\t|src=\n\t\t\t\t\t|BX\\.loadCSS\\(\n\t\t\t\t\t|BX\\.loadScript\\(\n\t\t\t\t\t|jsUtils\\.loadJSFile\\(\n\t\t\t\t\t|background\\s*:\\s*url\\(\n\t\t\t\t)) #attribute\n\t\t\t\t(\"|') #open_quote\n\t\t\t\t(" . $prefix_regex . ") #prefix\n\t\t\t\t([^?'\"]+\\.) #href body\n\t\t\t\t(" . $extension_regex . ") #extension\n\t\t\t\t(|\\?\\d+|\\?v=\\d+) #params\n\t\t\t\t(\\2) #close_quote\n\t\t\t/x"; $content = preg_replace_callback($regex, array("CBitrixCloudCDN", "_filter"), $content); } }
public function DoInstall() { if (IsModuleInstalled('sale')) { global $APPLICATION; $this->InstallFiles(); RegisterModule($this->MODULE_ID); return true; } $MODULE_ID = $this->MODULE_ID; $TAG = 'VWS'; $MESSAGE = GetMessage('LP_ERR_MODULE_NOT_FOUND', array('#MODULE#' => 'sale')); $intID = CAdminNotify::Add(compact('MODULE_ID', 'TAG', 'MESSAGE')); return false; }
public static function updateDBSchema() { global $DB, $DBType; $updater = new \CUpdater(); $updater->Init($curPath = "", $DBType, $updaterName = "", $curDir = "", "sale", "DB"); // table existence check $locationTableExists = $updater->TableExists("b_sale_location"); if ($locationTableExists) { $locationGroupTableExists = $updater->TableExists("b_sale_location_group"); $locationGroupNameTableExists = $updater->TableExists("b_sale_location_group_lang"); $locationNameTableExists = $updater->TableExists("b_sale_loc_name"); $locationExternalServiceTableExists = $updater->TableExists("b_sale_loc_ext_srv"); $locationExternalTableExists = $updater->TableExists("b_sale_loc_ext"); $locationTypeTableExists = $updater->TableExists("b_sale_loc_type"); $locationTypeNameTableExists = $updater->TableExists("b_sale_loc_type_name"); $locationLoc2SiteTableExists = $updater->TableExists("b_sale_loc_2site"); $locationDefaul2SiteTableExists = $updater->TableExists("b_sale_loc_def2site"); $tax2LocationTableExists = $updater->TableExists("b_sale_tax2location"); $delivery2LocationTableExists = $updater->TableExists("b_sale_delivery2location"); // adding columns to B_SALE_LOCATION // if CODE not exists, add it if (!$DB->query("select CODE from b_sale_location WHERE 1=0", true)) { $updater->query(array("MySQL" => "ALTER TABLE b_sale_location ADD CODE varchar(100) not null", "MSSQL" => "ALTER TABLE B_SALE_LOCATION ADD CODE varchar(100) default '' NOT NULL", "Oracle" => "ALTER TABLE B_SALE_LOCATION ADD CODE VARCHAR2(100 CHAR) default '' NOT NULL")); } // if CODE exists, copy values from ID and add index if ($DB->query("select CODE from b_sale_location WHERE 1=0", true)) { if (!$DB->IndexExists('b_sale_location', array('CODE'))) { $DB->query("update b_sale_location set CODE = ID"); // OK: oracle, mssql $DB->query("CREATE UNIQUE INDEX IX_B_SALE_LOC_CODE ON b_sale_location (CODE)"); // OK: oracle, mssql } } // create LEFT_MARGIN if (!$DB->query("select LEFT_MARGIN from b_sale_location WHERE 1=0", true)) { $updater->query(array("MySQL" => "ALTER TABLE b_sale_location ADD LEFT_MARGIN int", "MSSQL" => "ALTER TABLE B_SALE_LOCATION ADD LEFT_MARGIN int", "Oracle" => "ALTER TABLE B_SALE_LOCATION ADD LEFT_MARGIN NUMBER(18)")); } // create RIGHT_MARGIN if (!$DB->query("select RIGHT_MARGIN from b_sale_location WHERE 1=0", true)) { $updater->query(array("MySQL" => "ALTER TABLE b_sale_location ADD RIGHT_MARGIN int", "MSSQL" => "ALTER TABLE B_SALE_LOCATION ADD RIGHT_MARGIN int", "Oracle" => "ALTER TABLE B_SALE_LOCATION ADD RIGHT_MARGIN NUMBER(18)")); } $lMarginExists = $DB->query("select LEFT_MARGIN from b_sale_location WHERE 1=0", true); $rMarginExists = $DB->query("select RIGHT_MARGIN from b_sale_location WHERE 1=0", true); // add indexes if margins exist, but indexes not if ($lMarginExists && $rMarginExists) { if (!$DB->IndexExists('b_sale_location', array('LEFT_MARGIN', 'RIGHT_MARGIN'))) { $DB->query("CREATE INDEX IX_B_SALE_LOC_MARGINS ON b_sale_location (LEFT_MARGIN, RIGHT_MARGIN)"); // OK: oracle, mssql } if (!$DB->IndexExists('b_sale_location', array('RIGHT_MARGIN', 'LEFT_MARGIN'))) { $DB->query("CREATE INDEX IX_B_SALE_LOC_MARGINS_REV ON b_sale_location (RIGHT_MARGIN, LEFT_MARGIN)"); // OK: oracle, mssql } } // add PARENT_ID if (!$DB->query("select PARENT_ID from b_sale_location WHERE 1=0", true)) { $updater->query(array("MySQL" => "ALTER TABLE b_sale_location ADD PARENT_ID int DEFAULT '0'", "MSSQL" => "ALTER TABLE B_SALE_LOCATION ADD PARENT_ID int DEFAULT '0'", "Oracle" => "ALTER TABLE B_SALE_LOCATION ADD PARENT_ID NUMBER(18) DEFAULT '0'")); } // add index, if not exist for PARENT_ID, that exists if ($DB->query("select PARENT_ID from b_sale_location WHERE 1=0", true) && !$DB->IndexExists('b_sale_location', array('PARENT_ID'))) { $DB->query('CREATE INDEX IX_B_SALE_LOC_PARENT ON b_sale_location (PARENT_ID)'); // OK: oracle, mssql } // add DEPTH_LEVEL if (!$DB->query("select DEPTH_LEVEL from b_sale_location WHERE 1=0", true)) { $updater->query(array("MySQL" => "ALTER TABLE b_sale_location ADD DEPTH_LEVEL int default '1'", "MSSQL" => "ALTER TABLE B_SALE_LOCATION ADD DEPTH_LEVEL int DEFAULT '1'", "Oracle" => "ALTER TABLE B_SALE_LOCATION ADD DEPTH_LEVEL NUMBER(18) DEFAULT '1'")); } // add index, if not exist for DEPTH_LEVEL, that exists if ($DB->query("select DEPTH_LEVEL from b_sale_location WHERE 1=0", true) && !$DB->IndexExists('b_sale_location', array('DEPTH_LEVEL'))) { $DB->query("CREATE INDEX IX_B_SALE_LOC_DL ON b_sale_location (DEPTH_LEVEL)"); // OK: oracle, mssql } // add TYPE_ID if (!$DB->query("select TYPE_ID from b_sale_location WHERE 1=0", true)) { $updater->query(array("MySQL" => "ALTER TABLE b_sale_location ADD TYPE_ID int", "MSSQL" => "ALTER TABLE B_SALE_LOCATION ADD TYPE_ID int", "Oracle" => "ALTER TABLE B_SALE_LOCATION ADD TYPE_ID NUMBER(18)")); } // add index, if not exist for TYPE_ID, that exists if ($DB->query("select TYPE_ID from b_sale_location WHERE 1=0", true) && !$DB->IndexExists('b_sale_location', array('TYPE_ID'))) { $DB->query("CREATE INDEX IX_B_SALE_LOC_TYPE ON b_sale_location (TYPE_ID)"); // OK: oracle, mssql } // add LATITUDE if (!$DB->query("select LATITUDE from b_sale_location WHERE 1=0", true)) { $updater->query(array("MySQL" => "ALTER TABLE b_sale_location ADD LATITUDE decimal(8,6)", "MSSQL" => "ALTER TABLE B_SALE_LOCATION ADD LATITUDE decimal(8,6)", "Oracle" => "ALTER TABLE B_SALE_LOCATION ADD LATITUDE NUMBER(8,6)")); } // add LONGITUDE if (!$DB->query("select LONGITUDE from b_sale_location WHERE 1=0", true)) { $updater->query(array("MySQL" => "ALTER TABLE b_sale_location ADD LONGITUDE decimal(9,6)", "MSSQL" => "ALTER TABLE B_SALE_LOCATION ADD LONGITUDE decimal(9,6)", "Oracle" => "ALTER TABLE B_SALE_LOCATION ADD LONGITUDE NUMBER(9,6)")); } // dropping not-nulls if ($DBType == 'mysql') { $DB->query("ALTER TABLE b_sale_location MODIFY COUNTRY_ID int NULL"); } if ($DBType == 'mssql') { $DB->query("ALTER TABLE B_SALE_LOCATION ALTER COLUMN COUNTRY_ID int NULL"); } if ($DBType == 'oracle') { // dropping not-nulls if ($DB->query("SELECT * FROM ALL_TAB_COLUMNS WHERE TABLE_NAME = 'B_SALE_LOCATION' and COLUMN_NAME = 'COUNTRY_ID' and NULLABLE = 'N'")->fetch()) { //if ($DB->IndexExists('b_sale_location', array('COUNTRY_ID'))) // $DB->query('drop index IXS_LOCATION_COUNTRY_ID'); $DB->query("ALTER TABLE B_SALE_LOCATION MODIFY ( COUNTRY_ID NUMBER(18) NULL)"); } //if (!$DB->IndexExists('b_sale_location', array('COUNTRY_ID'))) // $DB->query('CREATE INDEX IXS_LOCATION_COUNTRY_ID ON B_SALE_LOCATION(COUNTRY_ID)'); // altering sequences for oracle // new sequence for b_sale_location if ($DB->query("select * from USER_OBJECTS where OBJECT_TYPE = 'SEQUENCE' and OBJECT_NAME = 'SQ_SALE_LOCATION'", true)->fetch()) { $DB->query("RENAME SQ_SALE_LOCATION TO SQ_B_SALE_LOCATION"); // OK $DB->query("CREATE OR REPLACE TRIGGER B_SALE_LOCATION_INSERT\n\t\t\t\t\t\tBEFORE INSERT\n\t\t\t\t\t\tON B_SALE_LOCATION\n\t\t\t\t\t\tFOR EACH ROW\n\t\t\t\t\t\tBEGIN\n\t\t\t\t\t\t\tIF :NEW.ID IS NULL THEN\n\t\t\t\t\t\t\t\tSELECT SQ_B_SALE_LOCATION.NEXTVAL INTO :NEW.ID FROM dual;\n\t\t\t\t\t\t\tEND IF;\n\t\t\t\t\t\tEND;"); // OK } // new sequence for b_sale_location_group if ($locationGroupTableExists && !$DB->query("select * from USER_OBJECTS where OBJECT_TYPE = 'SEQUENCE' and OBJECT_NAME = 'SQ_B_SALE_LOCATION_GROUP'", true)->fetch()) { $DB->query("RENAME SQ_SALE_LOCATION_GROUP TO SQ_B_SALE_LOCATION_GROUP"); // OK $DB->query("CREATE OR REPLACE TRIGGER B_SALE_LOCATION_GROUP_INSERT\n\t\t\t\t\t\tBEFORE INSERT\n\t\t\t\t\t\tON B_SALE_LOCATION_GROUP\n\t\t\t\t\t\tFOR EACH ROW\n\t\t\t\t\t\tBEGIN\n\t\t\t\t\t\t\tIF :NEW.ID IS NULL THEN\n\t\t\t\t\t\t\t\tSELECT SQ_B_SALE_LOCATION_GROUP.NEXTVAL INTO :NEW.ID FROM dual;\n\t\t\t\t\t\t\tEND IF;\n\t\t\t\t\t\tEND;"); // OK } // new sequence for b_sale_location_group_lang if ($locationGroupNameTableExists && !$DB->query("select * from USER_OBJECTS where OBJECT_TYPE = 'SEQUENCE' and OBJECT_NAME = 'SQ_B_SALE_LOCATION_GROUP_LANG'", true)->fetch()) { $DB->query("RENAME SQ_SALE_LOCATION_GROUP_LANG TO SQ_B_SALE_LOCATION_GROUP_LANG"); // OK $DB->query("CREATE OR REPLACE TRIGGER B_SALE_LOCGR_LANG_INSERT\n\t\t\t\t\t\tBEFORE INSERT\n\t\t\t\t\t\tON B_SALE_LOCATION_GROUP_LANG\n\t\t\t\t\t\tFOR EACH ROW\n\t\t\t\t\t\tBEGIN\n\t\t\t\t\t\t\tIF :NEW.ID IS NULL THEN\n\t\t\t\t\t\t\t\tSELECT SQ_B_SALE_LOCATION_GROUP_LANG.NEXTVAL INTO :NEW.ID FROM dual;\n\t\t\t\t\t\t\tEND IF;\n\t\t\t\t\t\tEND;"); // OK } } // adding columns to B_SALE_LOCATION_GROUP if ($locationGroupTableExists) { if (!$DB->query("select CODE from b_sale_location_group WHERE 1=0", true)) { $updater->query(array("MySQL" => "ALTER TABLE b_sale_location_group ADD CODE varchar(100) NOT NULL", "MSSQL" => "ALTER TABLE B_SALE_LOCATION_GROUP ADD CODE varchar(100) default '' NOT NULL", "Oracle" => "ALTER TABLE B_SALE_LOCATION_GROUP ADD CODE VARCHAR2(100 CHAR) default '' NOT NULL")); } // if CODE exists, copy values from ID and add index if ($DB->query("select CODE from b_sale_location_group WHERE 1=0", true)) { if (!$DB->IndexExists('b_sale_location_group', array('CODE'))) { $DB->query("update b_sale_location_group set CODE = ID"); // OK: oracle, mssql $DB->query("CREATE UNIQUE INDEX IX_B_SALE_LOC_GROUP_CODE ON b_sale_location_group (CODE)"); // OK: oracle, mssql } } } if (!$locationNameTableExists) { $updater->query(array("MySQL" => "create table b_sale_loc_name (\n\t\t\t\t\t\t\t\t\tID int not null auto_increment,\n\t\t\t\t\t\t\t\t\tLANGUAGE_ID char(2) not null,\n\t\t\t\t\t\t\t\t\tLOCATION_ID int not null,\n\t\t\t\t\t\t\t\t\tNAME varchar(100) not null,\n\t\t\t\t\t\t\t\t\tNAME_UPPER varchar(100) not null,\n\t\t\t\t\t\t\t\t\tSHORT_NAME varchar(100),\n\n\t\t\t\t\t\t\t\t\tprimary key (ID)\n\t\t\t\t\t\t\t\t)", "MSSQL" => "CREATE TABLE B_SALE_LOC_NAME (\n\t\t\t\t\t\t\t\t\tID int NOT NULL IDENTITY (1, 1),\n\t\t\t\t\t\t\t\t\tLANGUAGE_ID char(2) NOT NULL,\n\t\t\t\t\t\t\t\t\tLOCATION_ID int NOT NULL,\n\t\t\t\t\t\t\t\t\tNAME varchar(100) NOT NULL,\n\t\t\t\t\t\t\t\t\tNAME_UPPER varchar(100) NOT NULL,\n\t\t\t\t\t\t\t\t\tSHORT_NAME varchar(100)\n\n\t\t\t\t\t\t\t\t\tCONSTRAINT PK_B_SALE_LOC_NAME PRIMARY KEY (ID)\n\t\t\t\t\t\t\t\t)", "Oracle" => "CREATE TABLE B_SALE_LOC_NAME(\n\t\t\t\t\t\t\t\t\tID NUMBER(18) NOT NULL,\n\t\t\t\t\t\t\t\t\tLANGUAGE_ID CHAR(2 CHAR) NOT NULL,\n\t\t\t\t\t\t\t\t\tLOCATION_ID NUMBER(18) NOT NULL,\n\t\t\t\t\t\t\t\t\tNAME VARCHAR2(100 CHAR) NOT NULL,\n\t\t\t\t\t\t\t\t\tNAME_UPPER VARCHAR2(100 CHAR) NOT NULL,\n\t\t\t\t\t\t\t\t\tSHORT_NAME VARCHAR2(100 CHAR),\n\n\t\t\t\t\t\t\t\t\tPRIMARY KEY (ID)\n\t\t\t\t\t\t\t\t)")); $locationNameTableExists = true; } if ($DBType == 'oracle' && $locationNameTableExists && !$DB->query("select * from USER_OBJECTS where OBJECT_TYPE = 'SEQUENCE' and OBJECT_NAME = 'SQ_B_SALE_LOC_NAME'", true)->fetch()) { $DB->query("CREATE SEQUENCE SQ_B_SALE_LOC_NAME INCREMENT BY 1 NOMAXVALUE NOCYCLE NOCACHE NOORDER"); // OK $DB->query("CREATE OR REPLACE TRIGGER B_SALE_LOC_NAME_INSERT\n\t\tBEFORE INSERT\n\t\tON B_SALE_LOC_NAME\n\t\tFOR EACH ROW\n\t\tBEGIN\n\t\t\tIF :NEW.ID IS NULL THEN\n\t\t\t\tSELECT SQ_B_SALE_LOC_NAME.NEXTVAL INTO :NEW.ID FROM dual;\n\t\t\tEND IF;\n\t\tEND;"); // OK } if ($locationNameTableExists) { if (!$DB->IndexExists('b_sale_loc_name', array('NAME_UPPER'))) { $DB->query("CREATE INDEX IX_B_SALE_LOC_NAME_NAME_U ON b_sale_loc_name (NAME_UPPER)"); // OK: oracle, mssql } if (!$DB->IndexExists('b_sale_loc_name', array('LOCATION_ID', 'LANGUAGE_ID'))) { $DB->query("CREATE INDEX IX_B_SALE_LOC_NAME_LI_LI ON b_sale_loc_name (LOCATION_ID, LANGUAGE_ID)"); // OK: oracle, mssql } } if (!$locationExternalServiceTableExists) { $updater->query(array("MySQL" => "create table b_sale_loc_ext_srv(\n\t\t\t\t\t\t\t\t\tID int not null auto_increment,\n\t\t\t\t\t\t\t\t\tCODE varchar(100) not null,\n\n\t\t\t\t\t\t\t\t\tprimary key (ID)\n\t\t\t\t\t\t\t\t)", "MSSQL" => "CREATE TABLE B_SALE_LOC_EXT_SRV(\n\t\t\t\t\t\t\t\t\tID int NOT NULL IDENTITY (1, 1),\n\t\t\t\t\t\t\t\t\tCODE varchar(100) NOT NULL\n\n\t\t\t\t\t\t\t\t\tCONSTRAINT PK_B_SALE_LOC_EXT_SRV PRIMARY KEY (ID)\n\t\t\t\t\t\t\t\t)", "Oracle" => "CREATE TABLE B_SALE_LOC_EXT_SRV(\n\t\t\t\t\t\t\t\t\tID NUMBER(18) NOT NULL,\n\t\t\t\t\t\t\t\t\tCODE VARCHAR2(100 CHAR) NOT NULL,\n\n\t\t\t\t\t\t\t\t\tPRIMARY KEY (ID)\n\t\t\t\t\t\t\t\t)")); $locationExternalServiceTableExists = true; } if ($DBType == 'oracle' && $locationExternalServiceTableExists && !$DB->query("select * from USER_OBJECTS where OBJECT_TYPE = 'SEQUENCE' and OBJECT_NAME = 'SQ_B_SALE_LOC_EXT_SRV'", true)->fetch()) { $DB->query("CREATE SEQUENCE SQ_B_SALE_LOC_EXT_SRV INCREMENT BY 1 NOMAXVALUE NOCYCLE NOCACHE NOORDER"); // OK $DB->query("CREATE OR REPLACE TRIGGER B_SALE_LOC_EXT_SRV_INSERT\n\t\tBEFORE INSERT\n\t\tON B_SALE_LOC_EXT_SRV\n\t\tFOR EACH ROW\n\t\tBEGIN\n\t\t\tIF :NEW.ID IS NULL THEN\n\t\t\t\tSELECT SQ_B_SALE_LOC_EXT_SRV.NEXTVAL INTO :NEW.ID FROM dual;\n\t\t\tEND IF;\n\t\tEND;"); // OK } if (!$locationExternalTableExists) { $updater->query(array("MySQL" => "create table b_sale_loc_ext(\n\t\t\t\t\t\t\t\t\tID int not null auto_increment,\n\t\t\t\t\t\t\t\t\tSERVICE_ID int not null,\n\t\t\t\t\t\t\t\t\tLOCATION_ID int not null,\n\t\t\t\t\t\t\t\t\tXML_ID varchar(100) not null,\n\n\t\t\t\t\t\t\t\t\tprimary key (ID)\n\t\t\t\t\t\t\t\t)", "MSSQL" => "CREATE TABLE B_SALE_LOC_EXT(\n\t\t\t\t\t\t\t\t\tID int NOT NULL IDENTITY (1, 1),\n\t\t\t\t\t\t\t\t\tSERVICE_ID int NOT NULL,\n\t\t\t\t\t\t\t\t\tLOCATION_ID int NOT NULL,\n\t\t\t\t\t\t\t\t\tXML_ID varchar(100) NOT NULL\n\n\t\t\t\t\t\t\t\t\tCONSTRAINT PK_B_SALE_LOC_EXT PRIMARY KEY (ID)\n\t\t\t\t\t\t\t\t)", "Oracle" => "CREATE TABLE B_SALE_LOC_EXT(\n\t\t\t\t\t\t\t\t\tID NUMBER(18) NOT NULL,\n\t\t\t\t\t\t\t\t\tSERVICE_ID NUMBER(18) NOT NULL,\n\t\t\t\t\t\t\t\t\tLOCATION_ID NUMBER(18) NOT NULL,\n\t\t\t\t\t\t\t\t\tXML_ID VARCHAR2(100 CHAR) NOT NULL,\n\n\t\t\t\t\t\t\t\t\tPRIMARY KEY (ID)\n\t\t\t\t\t\t\t\t)")); $locationExternalTableExists = true; } if ($DBType == 'oracle' && $locationExternalTableExists && !$DB->query("select * from USER_OBJECTS where OBJECT_TYPE = 'SEQUENCE' and OBJECT_NAME = 'SQ_B_SALE_LOC_EXT'", true)->fetch()) { $DB->query("CREATE SEQUENCE SQ_B_SALE_LOC_EXT INCREMENT BY 1 NOMAXVALUE NOCYCLE NOCACHE NOORDER"); // OK $DB->query("CREATE OR REPLACE TRIGGER B_SALE_LOC_EXT_INSERT\n\t\tBEFORE INSERT\n\t\tON B_SALE_LOC_EXT\n\t\tFOR EACH ROW\n\t\tBEGIN\n\t\t\tIF :NEW.ID IS NULL THEN\n\t\t\t\tSELECT SQ_B_SALE_LOC_EXT.NEXTVAL INTO :NEW.ID FROM dual;\n\t\t\tEND IF;\n\t\tEND;"); // OK } if ($locationExternalTableExists && !$DB->IndexExists('b_sale_loc_ext', array('LOCATION_ID', 'SERVICE_ID'))) { $DB->query("CREATE INDEX IX_B_SALE_LOC_EXT_LID_SID ON b_sale_loc_ext (LOCATION_ID, SERVICE_ID)"); // OK: oracle, mssql } if (!$locationTypeTableExists) { $updater->query(array("MySQL" => "create table b_sale_loc_type(\n\t\t\t\t\t\t\t\t\tID int not null auto_increment,\n\t\t\t\t\t\t\t\t\tCODE varchar(30) not null,\n\t\t\t\t\t\t\t\t\tSORT int default '100',\n\n\t\t\t\t\t\t\t\t\tprimary key (ID)\n\t\t\t\t\t\t\t\t)", "MSSQL" => "CREATE TABLE B_SALE_LOC_TYPE(\n\t\t\t\t\t\t\t\t\tID int NOT NULL IDENTITY (1, 1),\n\t\t\t\t\t\t\t\t\tCODE varchar(30) NOT NULL,\n\t\t\t\t\t\t\t\t\tSORT int\n\n\t\t\t\t\t\t\t\t\tCONSTRAINT PK_B_SALE_LOC_TYPE PRIMARY KEY (ID)\n\t\t\t\t\t\t\t\t)", "Oracle" => "CREATE TABLE B_SALE_LOC_TYPE(\n\t\t\t\t\t\t\t\t\tID NUMBER(18) NOT NULL,\n\t\t\t\t\t\t\t\t\tCODE VARCHAR2(30 CHAR) NOT NULL,\n\t\t\t\t\t\t\t\t\tSORT NUMBER(18) DEFAULT '100',\n\n\t\t\t\t\t\t\t\t\tPRIMARY KEY (ID)\n\t\t\t\t\t\t\t\t)")); $updater->query(array("MSSQL" => "ALTER TABLE B_SALE_LOC_TYPE ADD CONSTRAINT DF_B_SALE_LOC_TYPE_SORT DEFAULT '100' FOR SORT")); $locationTypeTableExists = true; } if ($DBType == 'oracle' && $locationTypeTableExists && !$DB->query("select * from USER_OBJECTS where OBJECT_TYPE = 'SEQUENCE' and OBJECT_NAME = 'SQ_B_SALE_LOC_TYPE'", true)->fetch()) { $DB->query("CREATE SEQUENCE SQ_B_SALE_LOC_TYPE INCREMENT BY 1 NOMAXVALUE NOCYCLE NOCACHE NOORDER"); // OK $DB->query("CREATE OR REPLACE TRIGGER B_SALE_LOC_TYPE_INSERT\n\t\tBEFORE INSERT\n\t\tON B_SALE_LOC_TYPE\n\t\tFOR EACH ROW\n\t\tBEGIN\n\t\t\tIF :NEW.ID IS NULL THEN\n\t\t\t\tSELECT SQ_B_SALE_LOC_TYPE.NEXTVAL INTO :NEW.ID FROM dual;\n\t\t\tEND IF;\n\t\tEND;"); // OK } if (!$locationTypeNameTableExists) { $updater->query(array("MySQL" => "create table b_sale_loc_type_name(\n\t\t\t\t\t\t\t\t\tID int not null auto_increment,\n\t\t\t\t\t\t\t\t\tLANGUAGE_ID char(2) not null,\n\t\t\t\t\t\t\t\t\tNAME varchar(100) not null,\n\t\t\t\t\t\t\t\t\tTYPE_ID int not null,\n\n\t\t\t\t\t\t\t\t\tprimary key (ID)\n\t\t\t\t\t\t\t\t)", "MSSQL" => "CREATE TABLE B_SALE_LOC_TYPE_NAME(\n\t\t\t\t\t\t\t\t\tID int NOT NULL IDENTITY (1, 1),\n\t\t\t\t\t\t\t\t\tLANGUAGE_ID char(2) NOT NULL,\n\t\t\t\t\t\t\t\t\tNAME varchar(100) NOT NULL,\n\t\t\t\t\t\t\t\t\tTYPE_ID int NOT NULL\n\n\t\t\t\t\t\t\t\t\tCONSTRAINT PK_B_SALE_LOC_TYPE_NAME PRIMARY KEY (ID)\n\t\t\t\t\t\t\t\t)", "Oracle" => "CREATE TABLE B_SALE_LOC_TYPE_NAME(\n\t\t\t\t\t\t\t\t\tID NUMBER(18) NOT NULL,\n\t\t\t\t\t\t\t\t\tLANGUAGE_ID CHAR(2 CHAR) NOT NULL,\n\t\t\t\t\t\t\t\t\tNAME VARCHAR2(100 CHAR) NOT NULL,\n\t\t\t\t\t\t\t\t\tTYPE_ID NUMBER(18) NOT NULL,\n\n\t\t\t\t\t\t\t\t\tPRIMARY KEY (ID)\n\t\t\t\t\t\t\t\t)")); $locationTypeNameTableExists = true; } if ($DBType == 'oracle' && $locationTypeNameTableExists && !$DB->query("select * from USER_OBJECTS where OBJECT_TYPE = 'SEQUENCE' and OBJECT_NAME = 'SQ_B_SALE_LOC_TYPE_NAME'", true)->fetch()) { $DB->query("CREATE SEQUENCE SQ_B_SALE_LOC_TYPE_NAME INCREMENT BY 1 NOMAXVALUE NOCYCLE NOCACHE NOORDER"); // OK $DB->query("CREATE OR REPLACE TRIGGER B_SALE_LOC_TYPE_NAME_INSERT\n\t\tBEFORE INSERT\n\t\tON B_SALE_LOC_TYPE_NAME\n\t\tFOR EACH ROW\n\t\tBEGIN\n\t\t\tIF :NEW.ID IS NULL THEN\n\t\t\t\tSELECT SQ_B_SALE_LOC_TYPE_NAME.NEXTVAL INTO :NEW.ID FROM dual;\n\t\t\tEND IF;\n\t\tEND;"); // OK } if ($locationTypeNameTableExists) { if (!$DB->IndexExists('b_sale_loc_type_name', array('TYPE_ID', 'LANGUAGE_ID'))) { $DB->query('CREATE INDEX IX_B_SALE_LOC_TYPE_NAME_TI_LI ON b_sale_loc_type_name (TYPE_ID, LANGUAGE_ID)'); // OK: oracle, mssql } } if (!$locationLoc2SiteTableExists) { $updater->query(array("MySQL" => "create table b_sale_loc_2site(\n\t\t\t\t\t\t\t\t\tLOCATION_ID int not null,\n\t\t\t\t\t\t\t\t\tSITE_ID char(2) not null,\n\t\t\t\t\t\t\t\t\tLOCATION_TYPE char(1) not null default 'L',\n\n\t\t\t\t\t\t\t\t\tprimary key (SITE_ID, LOCATION_ID, LOCATION_TYPE)\n\t\t\t\t\t\t\t\t)", "MSSQL" => "CREATE TABLE B_SALE_LOC_2SITE(\n\t\t\t\t\t\t\t\t\tLOCATION_ID int NOT NULL,\n\t\t\t\t\t\t\t\t\tSITE_ID char(2) NOT NULL,\n\t\t\t\t\t\t\t\t\tLOCATION_TYPE char(1) NOT NULL\n\n\t\t\t\t\t\t\t\t\tCONSTRAINT PK_B_SALE_LOC_2SITE PRIMARY KEY (SITE_ID, LOCATION_ID, LOCATION_TYPE)\n\t\t\t\t\t\t\t\t)", "Oracle" => "CREATE TABLE B_SALE_LOC_2SITE(\n\t\t\t\t\t\t\t\t\tLOCATION_ID NUMBER(18) NOT NULL,\n\t\t\t\t\t\t\t\t\tSITE_ID CHAR(2 CHAR) NOT NULL,\n\t\t\t\t\t\t\t\t\tLOCATION_TYPE CHAR(1 CHAR) DEFAULT 'L' NOT NULL,\n\n\t\t\t\t\t\t\t\t\tPRIMARY KEY (SITE_ID, LOCATION_ID, LOCATION_TYPE)\n\t\t\t\t\t\t\t\t)")); $updater->query(array("MSSQL" => "ALTER TABLE B_SALE_LOC_2SITE ADD CONSTRAINT DF_B_SALE_LOC_2SITE DEFAULT 'L' FOR LOCATION_TYPE")); } if (!$locationDefaul2SiteTableExists) { $updater->query(array("MySQL" => "create table b_sale_loc_def2site(\n\t\t\t\t\t\t\t\t\tLOCATION_CODE varchar(100) not null,\n\t\t\t\t\t\t\t\t\tSITE_ID char(2) not null,\n\t\t\t\t\t\t\t\t\tSORT int default '100',\n\n\t\t\t\t\t\t\t\t\tprimary key (LOCATION_CODE, SITE_ID)\n\t\t\t\t\t\t\t\t)", "MSSQL" => "CREATE TABLE B_SALE_LOC_DEF2SITE(\n\t\t\t\t\t\t\t\t\tLOCATION_CODE varchar(100) NOT NULL,\n\t\t\t\t\t\t\t\t\tSITE_ID char(2) NOT NULL,\n\t\t\t\t\t\t\t\t\tSORT int\n\n\t\t\t\t\t\t\t\t\tCONSTRAINT PK_B_SALE_LOC_DEF2SITE PRIMARY KEY (LOCATION_CODE, SITE_ID)\n\t\t\t\t\t\t\t\t)", "Oracle" => "CREATE TABLE B_SALE_LOC_DEF2SITE(\n\t\t\t\t\t\t\t\t\tLOCATION_CODE VARCHAR2(100 CHAR) NOT NULL,\n\t\t\t\t\t\t\t\t\tSITE_ID CHAR(2 CHAR) NOT NULL,\n\t\t\t\t\t\t\t\t\tSORT NUMBER(18) DEFAULT '100',\n\n\t\t\t\t\t\t\t\t\tPRIMARY KEY (LOCATION_CODE, SITE_ID)\n\t\t\t\t\t\t\t\t)")); $updater->query(array("MSSQL" => "ALTER TABLE B_SALE_LOC_DEF2SITE ADD CONSTRAINT DF_B_SALE_LOC_DEF2SITE_SORT DEFAULT '100' FOR SORT")); } // move tax and delivery to the new relation field: code if ($tax2LocationTableExists && $DB->query("select LOCATION_ID from b_sale_tax2location WHERE 1=0", true)) { $DB->query('delete from b_sale_tax2location where LOCATION_ID is null'); // OK: oracle, mssql // useless records to be deleted if (!$DB->query("select LOCATION_CODE from b_sale_tax2location WHERE 1=0", true)) { $updater->query(array("MySQL" => "ALTER TABLE b_sale_tax2location ADD LOCATION_CODE varchar(100) NOT NULL", "MSSQL" => "ALTER TABLE B_SALE_TAX2LOCATION ADD LOCATION_CODE varchar(100) default '' NOT NULL", "Oracle" => "ALTER TABLE B_SALE_TAX2LOCATION ADD LOCATION_CODE VARCHAR2(100 CHAR) default '' NOT NULL")); } $DB->query('update b_sale_tax2location set LOCATION_CODE = LOCATION_ID'); // OK: oracle, mssql if ($DBType == 'mssql') { $DB->query('ALTER TABLE b_sale_tax2location DROP CONSTRAINT PK_B_SALE_TAX2LOCATION'); } else { $DB->query('ALTER TABLE b_sale_tax2location DROP PRIMARY KEY'); } // OK: oracle $DB->query('ALTER TABLE b_sale_tax2location DROP COLUMN LOCATION_ID'); // OK: oracle, mssql $DB->query('ALTER TABLE b_sale_tax2location ADD CONSTRAINT PK_B_SALE_TAX2LOCATION PRIMARY KEY (TAX_RATE_ID, LOCATION_CODE, LOCATION_TYPE)'); // OK: oracle, mssql } if ($delivery2LocationTableExists && $DB->query("select LOCATION_ID from b_sale_delivery2location WHERE 1=0", true)) { $DB->query('delete from b_sale_delivery2location where LOCATION_ID is null'); // OK: oracle, mssql // useless records to be deleted if (!$DB->query("select LOCATION_CODE from b_sale_delivery2location WHERE 1=0", true)) { $updater->query(array("MySQL" => "ALTER TABLE b_sale_delivery2location ADD LOCATION_CODE varchar(100) NOT NULL", "MSSQL" => "ALTER TABLE B_SALE_DELIVERY2LOCATION ADD LOCATION_CODE varchar(100) default '' NOT NULL", "Oracle" => "ALTER TABLE B_SALE_DELIVERY2LOCATION ADD LOCATION_CODE VARCHAR2(100 CHAR) default '' NOT NULL")); } $DB->query('update b_sale_delivery2location set LOCATION_CODE = LOCATION_ID'); // OK: oracle, mssql if ($DBType == 'mssql') { $DB->query('ALTER TABLE b_sale_delivery2location DROP CONSTRAINT PK_B_SALE_DELIVERY2LOCATION'); } else { $DB->query('ALTER TABLE b_sale_delivery2location DROP PRIMARY KEY'); } // OK: oracle $DB->query('ALTER TABLE b_sale_delivery2location DROP COLUMN LOCATION_ID'); // OK: oracle, mssql $DB->query('ALTER TABLE b_sale_delivery2location ADD CONSTRAINT PK_B_SALE_DELIVERY2LOCATION PRIMARY KEY (DELIVERY_ID, LOCATION_CODE, LOCATION_TYPE)'); // OK: oracle, mssql } if (\COption::GetOptionString('sale', 'sale_locationpro_migrated', '') != 'Y') { \CAdminNotify::Add(array("MESSAGE" => Loc::getMessage('SALE_LOCATION_MIGRATION_PLZ_MIGRATE_NOTIFIER', array('#ANCHOR_MIGRATE#' => '<a href="/bitrix/admin/sale_location_migration.php">', '#ANCHOR_END#' => '</a>')), "TAG" => "SALE_LOCATIONPRO_PLZ_MIGRATE", "MODULE_ID" => "SALE", "ENABLE_CLOSE" => "Y")); } } }
/** * Checking all forms for spam * @return null|boolean NULL when success or FALSE when spam detected */ public function OnPageStartHandler() { global $APPLICATION, $USER; if (!is_object($USER)) { $USER = new CUser(); } $ct_status = COption::GetOptionString('cleantalk.antispam', 'status', '0'); $ct_global = COption::GetOptionString('cleantalk.antispam', 'form_global_check', '0'); $key = COption::GetOptionString('cleantalk.antispam', 'key', ''); $last_checked = COption::GetOptionString('cleantalk.antispam', 'last_checked', 0); $last_status = COption::GetOptionString('cleantalk.antispam', 'is_paid', 0); $new_checked = time(); $is_sfw = COption::GetOptionString('cleantalk.antispam', 'form_sfw', 0); $sfw_last_updated = COption::GetOptionString('cleantalk.antispam', 'sfw_last_updated', 0); if ($is_sfw == 1 && time() - $sfw_last_updated > 10) { global $DB; $data = array('auth_key' => $key, 'method_name' => '2s_blacklists_db'); $result = CleantalkAntispam::CleantalkSendRequest('https://api.cleantalk.org/2.1', $data, false); $result = json_decode($result, true); if (isset($result['data'])) { $result = $result['data']; $query = "INSERT INTO `" . $wpdb->base_prefix . "cleantalk_sfw` VALUES "; //$wpdb->query("TRUNCATE TABLE `".$wpdb->base_prefix."cleantalk_sfw`;"); for ($i = 0; $i < sizeof($result); $i++) { if ($i == sizeof($result) - 1) { $query .= "(" . $result[$i][0] . "," . $result[$i][1] . ");"; } else { $query .= "(" . $result[$i][0] . "," . $result[$i][1] . "), "; } } $DB->Query($query); } include_once "cleantalk-sfw.class.php"; $sfw = new CleanTalkSFW(); $sfw->send_logs(); COption::SetOptionString('cleantalk.antispam', 'sfw_last_updated', time()); } if ($is_sfw == 1 && !$USER->IsAdmin()) { include_once "cleantalk-sfw.class.php"; $is_sfw_check = true; $ip = CleantalkAntispam::CleantalkGetIP(); $ip = array_unique($ip); $sfw_log = COption::GetOptionString('cleantalk.antispam', 'sfw_log', ''); for ($i = 0; $i < sizeof($ip); $i++) { if (isset($_COOKIE['ct_sfw_pass_key']) && $_COOKIE['ct_sfw_pass_key'] == md5($ip[$i] . $key)) { $is_sfw_check = false; if (isset($_COOKIE['ct_sfw_passed'])) { if ($sfw_log == '') { $sfw_log = array(); $sfw_log[$ip[$i]] = array(); } else { $sfw_log = json_decode($sfw_log, true); } $sfw_log[$ip[$i]]['allow']++; COption::SetOptionString('cleantalk.antispam', 'sfw_log', json_encode($sfw_log)); @setcookie('ct_sfw_passed', '0', 1, "/"); } } } if ($is_sfw_check) { include_once "cleantalk-sfw.class.php"; $sfw = new CleanTalkSFW(); $sfw->cleantalk_get_real_ip(); $sfw->check_ip(); if ($sfw->result) { $sfw->sfw_die(); } } } if ($key != '' && $key != 'enter key' && $USER->IsAdmin()) { $new_status = $last_status; if ($new_checked - $last_checked > 86400) { $url = 'https://api.cleantalk.org'; $dt = array('auth_key' => $key, 'method_name' => 'get_account_status'); $result = CleantalkAntispam::CleantalkSendRequest($url, $dt, false); if ($result !== null) { $result = json_decode($result); if (isset($result->data) && isset($result->data->paid)) { $new_status = intval($result->data->paid); if ($last_status != 1 && $new_status == 1) { COption::SetOptionString('cleantalk.antispam', 'is_paid', 1); $show_notice = 1; if (LANGUAGE_ID == 'ru') { $review_message = "Нравится антиспам от CleanTalk? Расскажите другим об этом! <a target='_blank' href='http://marketplace.1c-bitrix.ru/solutions/cleantalk.antispam/#rating'>Оставьте отзыв в Bitrix.Marketplace</a>"; } else { $review_mess = "Like Anti-spam by CleanTalk? Help others learn about CleanTalk! <a target='_blank' href='http://marketplace.1c-bitrix.ru/solutions/cleantalk.antispam/#rating'>Leave a review at the Bitrix.Marketplace</a>"; } CAdminNotify::Add(array('MESSAGE' => $review_mess, 'TAG' => 'review_notify', 'MODULE_ID' => 'main', 'ENABLE_CLOSE' => 'Y')); } } } $url = 'https://api.cleantalk.org'; $dt = array('auth_key' => $key, 'method_name' => 'notice_paid_till'); $result = CleantalkAntispam::CleantalkSendRequest($url, $dt, false); if ($result !== null) { $result = json_decode($result); if (isset($result->moderate_ip) && $result->moderate_ip == 1) { COption::SetOptionString('cleantalk.antispam', 'moderate_ip', 1); COption::SetOptionString('cleantalk.antispam', 'ip_license', $result['ip_license']); } else { COption::SetOptionString('cleantalk.antispam', 'moderate_ip', 0); COption::SetOptionString('cleantalk.antispam', 'ip_license', 0); } } COption::SetOptionString('cleantalk.antispam', 'last_checked', $new_checked); } } if (!$USER->IsAdmin() && $ct_status == 1 && $ct_global == 1) { $sender_email = null; $message = ''; CleantalkAntispam::CleantalkGetFields($sender_email, $message, $_POST); if ($sender_email !== null) { $arUser = array(); $arUser["type"] = "comment"; $arUser["sender_email"] = $sender_email; $arUser["sender_nickname"] = ''; $arUser["sender_ip"] = $_SERVER['REMOTE_ADDR']; $arUser["message_title"] = ""; $arUser["message_body"] = $message; $arUser["example_title"] = ""; $arUser["example_body"] = ""; $arUser["example_comments"] = ""; $aResult = CleantalkAntispam::CheckAllBefore($arUser, FALSE); if (isset($aResult) && is_array($aResult)) { if ($aResult['errno'] == 0) { if ($aResult['allow'] == 1) { //Not spammer - just return; return; } else { CleantalkAntispam::CleantalkDie($aResult['ct_result_comment']); return false; } } } } } }
static function showAlarmMessage() { $tag = "PAY_SYSTEM_ACTION_ALARM"; $dbRes = CAdminNotify::GetList(array(), array("TAG" => $tag)); if ($res = $dbRes->Fetch()) { return false; } return CAdminNotify::Add(array("MESSAGE" => GetMessage("SKGPSA_ALARM_MESSAGE", array("#LANGUAGE_ID#" => LANGUAGE_ID)), "TAG" => $tag, "MODULE_ID" => "SALE", "ENABLE_CLOSE" => "Y", "TYPE" => CAdminNotify::TYPE_ERROR)); }
$arFields = array( "MESSAGE" => str_replace("#LINK#", '/bitrix/admin/cat_discount_convert.php', $arMess['BT_MOD_CAT_DSC_CONV_INVITE'][$strDefLang]), "TAG" => "CATALOG_DISC_CONVERT", "MODULE_ID" => "catalog", "ENABLE_CLOSE" => "N" ); $arLangMess = array(); foreach ($arMess['BT_MOD_CAT_DSC_CONV_INVITE'] as $strLangID => $strMess) { if (empty($strMess)) continue; $arLangMess[$strLangID] = str_replace("#LINK#", '/bitrix/admin/cat_discount_convert.php', $strMess); } if (!empty($arLangMess)) $arFields['LANG'] = $arLangMess; CAdminNotify::Add($arFields); } } } } } if ($bVarsFromForm) { if ($boolCondParseError) { $mxTempo = $arDiscount['CONDITIONS']; $arDiscount = $arFields; $arDiscount['CONDITIONS'] = $mxTempo; unset($mxTempo); }
protected function notifyAdmin($tag) { $dbRes = CAdminNotify::GetList(array(), array("TAG" => $tag)); if ($res = $dbRes->Fetch()) { return false; } CAdminNotify::Add(array("MESSAGE" => GetMessage("SALE_DH_RP_MESS_" . $tag, array("##LANGUAGE_ID##" => LANGUAGE_ID)), "TAG" => $tag, "MODULE_ID" => "SALE", "ENABLE_CLOSE" => "Y")); return true; }
function CommonTest() { if (!IsModuleInstalled('intranet') || defined('BX_CRONTAB') || (defined('CHK_EVENT') && CHK_EVENT === true)) // can't get real HTTP server vars from cron return "CSiteCheckerTest::CommonTest();"; if (($ntlm_varname = COption::GetOptionString('ldap', 'ntlm_varname', 'REMOTE_USER')) && ($user = trim($_SERVER[$ntlm_varname]))) return "CSiteCheckerTest::CommonTest();"; // Server NTLM is enabled, no way to connect through a socket IncludeModuleLangFile($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/admin/site_checker.php'); $step = 0; while(true) { if (is_object($oTest)) $ar = $oTest->arTestVars; $oTest = new CSiteCheckerTest($step, $fast = 1); $oTest->arTestVars = $ar; $oTest->host = $_SERVER['HTTP_HOST'] ? $_SERVER['HTTP_HOST'] : 'localhost'; $oTest->ssl = $_SERVER['HTTPS'] == 'on'; $oTest->port = $_SERVER['SERVER_PORT'] ? $_SERVER['SERVER_PORT'] : ($oTest->ssl ? 443 : 80); $oTest->Start(); if ($oTest->result === false) { $ar = Array( "MESSAGE" => GetMessage("MAIN_SC_GOT_ERRORS", array('#LINK#' => "/bitrix/admin/site_checker.php?lang=".LANGUAGE_ID."&express_test=Y")), "TAG" => "SITE_CHECKER", "MODULE_ID" => "MAIN", 'TYPE' => 'ERROR' ); CAdminNotify::Add($ar); break; } if ($oTest->percent >= 100) break; $step++; } return "CSiteCheckerTest::CommonTest();"; }
protected function notifyAdmin($code) { $tag = "YANDEX_MARKET_" . $code; $problemsCount = intval(\Bitrix\Main\Config\Option::get("sale", $tag, 0, $this->siteId)); if ($problemsCount < 3) { \Bitrix\Main\Config\Option::set("sale", $tag, $problemsCount + 1, $this->siteId); return false; } $dbRes = CAdminNotify::GetList(array(), array("TAG" => $tag)); if ($res = $dbRes->Fetch()) { return false; } CAdminNotify::Add(array("MESSAGE" => GetMessage("SALE_YMH_ADMIN_NOTIFY_" . $code, array("##LANGUAGE_ID##" => LANGUAGE_ID)), "TAG" => "YANDEX_MARKET_" . $code, "MODULE_ID" => "SALE", "ENABLE_CLOSE" => "Y")); \Bitrix\Main\Config\Option::set("sale", $tag, 0, $this->siteId); return true; }
$langList[] = $oneLanguage['ID']; } unset($oneLanguage, $languageIterator); $messID = 'SALE_CONVERTER_ADMIN_NOTIFY_CONVERT_BASKET_DISCOUNT'; foreach ($langList as &$oneLanguage) { $mess = Loc::loadLanguageFile(__FILE__, $oneLanguage); if (!isset($mess[$messID]) || empty($mess[$messID])) { continue; } $langMess[$oneLanguage] = str_replace('#LINK#', '/bitrix/admin/settings.php?lang=' . $oneLanguage . '&mid=sale', $mess[$messID]); } unset($mess, $oneLanguage); reset($langMess); $defaultMess = isset($langMess[LANGUAGE_ID]) ? $langMess[LANGUAGE_ID] : current($langMess); $fields = array('MESSAGE' => $defaultMess, 'TAG' => 'BASKET_DISCOUNT_CONVERTED', 'MODULE_ID' => 'sale', 'ENABLE_CLOSE' => 'Y', 'PUBLIC_SECTION' => 'N', 'LANG' => $langMess); CAdminNotify::Add($fields); unset($fields, $langMess, $defaultMess, $langList); } unset($adminNotify); } } } else { $message = Loc::getMessage('SALE_CONVERTER_AJAX_STEP_UPDATE_BASKET'); $result['ERROR'] = true; $type = 'ERROR'; $message .= "<br>" . $error; } ob_start(); CAdminMessage::ShowMessage(array("MESSAGE" => Loc::getMessage('SALE_CONVERTER_AJAX_STEP_FINAL_MESSAGE'), "DETAILS" => $message, "HTML" => true, "TYPE" => $type)); $result['DATA'] = ob_get_contents(); ob_end_clean();
protected static function _AddConvertDbNotify() { global $DB; // Is module data exists? if ($DB->TableExists('b_learn_lesson')) { // Ensure, that data in database converted to 11.5.0 version of module if (COption::GetOptionString('learning', '~LearnInstall201203ConvertDB::_IsAlreadyConverted', '-9', '') !== '1') { // Data for module not converted yet, generate message if (method_exists('CAdminNotify', 'Add')) { CAdminNotify::Add(array('MESSAGE' => str_replace('#LANG#', LANGUAGE_ID, GetMessage('LEARNING_ADMIN_NOTIFY_CONVERT_DB')), 'TAG' => 'learning_convert_11_5_0', 'MODULE_ID' => 'learning', 'ENABLE_CLOSE' => 'N')); } } } }
public static function informAdminLocationDatabaseFailure() { static::deleteInformer('SALE_LOCATIONPRO_DATABASE_FAILURE'); $fields = array("MESSAGE" => Loc::getMessage('SALE_LOCATION_ADMIN_LOCATION_HELPER_DATABASE_FAILURE', array('#ANCHOR_IMPORT_URL#' => '<a target="_blank" href="' . static::getImportUrl() . '">', '#ANCHOR_END#' => '</a>')), "TAG" => 'SALE_LOCATIONPRO_DATABASE_FAILURE', "MODULE_ID" => "sale", "ENABLE_CLOSE" => "Y", "PUBLIC_SECTION" => "N"); \CAdminNotify::Add($fields); }
private function getAdminId() { static $adminId; if ($adminId === null) { $adminId = CTasksTools::GetCommanderInChief(); if (!intval($adminId)) { CAdminNotify::Add(array("MESSAGE" => GetMessage('TASKS_COUNTERS_PROCESSOR_ADMIN_IS_NOT_AN_ADMIN'), "TAG" => "TASKS_SYSTEM_NO_ADMIN", "MODULE_ID" => "TASKS", "ENABLE_CLOSE" => "Y")); } } return $adminId; }
/** * * @return bool * */ private static function updateConfig() { if (!self::$config->lock()) { return true; } $delayExpiration = true; try { try { self::$config = CBitrixCloudCDNConfig::getInstance()->loadRemoteXML(); self::$config->saveToOptions(); self::$config->unlock(); } catch (CBitrixCloudException $e) { //In case of documented XML error we'll disable CDN if ($e->getErrorCode() !== "") { self::SetActive(false); $delayExpiration = false; } throw $e; } } catch (exception $e) { if ($delayExpiration) { self::$config->setExpired(time() + 1800); } CAdminNotify::Add(array("MESSAGE" => GetMessage("BCL_CDN_NOTIFY", array("#HREF#" => "/bitrix/admin/bitrixcloud_cdn.php?lang=" . LANGUAGE_ID)), "TAG" => "bitrixcloud_off", "MODULE_ID" => "bitrixcloud", "ENABLE_CLOSE" => "Y")); self::$config->unlock(); return false; } self::$config->unlock(); //Web service were disabled if (!self::$config->isActive()) { //By traffic quota if (self::$config->getQuota()->getTrafficSize() > self::$config->getQuota()->getAllowedSize()) { self::$config->setExpired(time() + 1800); CAdminNotify::Add(array("MESSAGE" => GetMessage("BCL_CDN_NOTIFY_QUOTA_LIMIT"), "TAG" => "bitrixcloud_off", "MODULE_ID" => "bitrixcloud", "ENABLE_CLOSE" => "N")); self::$config->unlock(); return false; } elseif (self::$config->getQuota()->isExpired()) { self::$config->setExpired(time() + 1800); CAdminNotify::Add(array("MESSAGE" => GetMessage("BCL_CDN_NOTIFY_QUOTA_EXPIRED"), "TAG" => "bitrixcloud_off", "MODULE_ID" => "bitrixcloud", "ENABLE_CLOSE" => "N")); self::$config->unlock(); return false; } } CAdminNotify::DeleteByTag("bitrixcloud_off"); return true; }
private static function SendCommand($channelId, $message, $method = 'POST', $timeout = 5, $dont_wait_answer = true) { if (!is_array($channelId)) $channelId = Array($channelId); $channelId = implode('/', array_unique($channelId)); if (strlen($channelId) <=0 || strlen($message) <= 0) return false; if (!in_array($method, Array('POST', 'GET'))) return false; $nginx_error = COption::GetOptionString("pull", "nginx_error", "N"); if ($nginx_error != "N") { $nginx_error = unserialize($nginx_error); if (intval($nginx_error['date'])+120 < time()) { COption::SetOptionString("pull", "nginx_error", "N"); CAdminNotify::DeleteByTag("PULL_ERROR_SEND"); $nginx_error = "N"; } else if ($nginx_error['count'] >= 10) { $ar = Array( "MESSAGE" => GetMessage('PULL_ERROR_SEND'), "TAG" => "PULL_ERROR_SEND", "MODULE_ID" => "pull", ); CAdminNotify::Add($ar); return false; } } $postdata = CHTTP::PrepareData($message); $CHTTP = new CHTTP(); $CHTTP->http_timeout = intval($timeout); $arUrl = $CHTTP->ParseURL(CPullOptions::GetPublishUrl($channelId), false); if ($CHTTP->Query($method, $arUrl['host'], $arUrl['port'], $arUrl['path_query'], $postdata, $arUrl['proto'], 'N', $dont_wait_answer)) { $result = $dont_wait_answer? '{}': $CHTTP->result; } else { if ($nginx_error == "N") { $nginx_error = Array( 'count' => 1, 'date' => time(), 'date_increment' => time(), ); } else if (intval($nginx_error['date_increment'])+1 < time()) { $nginx_error['count'] = intval($nginx_error['count'])+1; $nginx_error['date_increment'] = time(); } COption::SetOptionString("pull", "nginx_error", serialize($nginx_error)); $result = false; } return $result; }
private static function SendCommand($channelId, $message, $options = array()) { if (!is_array($channelId)) { $channelId = array($channelId); } $channelId = implode('/', array_unique($channelId)); if (strlen($channelId) <= 0 || strlen($message) <= 0) { return false; } $defaultOptions = array("method" => "POST", "timeout" => 5, "dont_wait_answer" => true); $options = array_merge($defaultOptions, $options); if (!in_array($options["method"], array('POST', 'GET'))) { return false; } $nginx_error = COption::GetOptionString("pull", "nginx_error", "N"); if ($nginx_error != "N") { $nginx_error = unserialize($nginx_error); if (intval($nginx_error['date']) + 120 < time()) { COption::SetOptionString("pull", "nginx_error", "N"); CAdminNotify::DeleteByTag("PULL_ERROR_SEND"); $nginx_error = "N"; } else { if ($nginx_error['count'] >= 10) { $ar = array("MESSAGE" => GetMessage('PULL_ERROR_SEND'), "TAG" => "PULL_ERROR_SEND", "MODULE_ID" => "pull"); CAdminNotify::Add($ar); return false; } } } $postdata = CHTTP::PrepareData($message); $CHTTP = new CHTTP(); $CHTTP->http_timeout = intval($options["timeout"]); if (isset($options["expiry"])) { $CHTTP->SetAdditionalHeaders(array("Message-Expiry" => intval($options["expiry"]))); } $arUrl = $CHTTP->ParseURL(CPullOptions::GetPublishUrl($channelId), false); try { $sendResult = $CHTTP->Query($options["method"], $arUrl['host'], $arUrl['port'], $arUrl['path_query'], $postdata, $arUrl['proto'], 'N', $options["dont_wait_answer"]); } catch (Exception $e) { $sendResult = false; } if ($sendResult) { $result = $options["dont_wait_answer"] ? '{}' : $CHTTP->result; } else { if ($nginx_error == "N") { $nginx_error = array('count' => 1, 'date' => time(), 'date_increment' => time()); } else { if (intval($nginx_error['date_increment']) + 1 < time()) { $nginx_error['count'] = intval($nginx_error['count']) + 1; $nginx_error['date_increment'] = time(); } } COption::SetOptionString("pull", "nginx_error", serialize($nginx_error)); $result = false; } return $result; }
function CommonTest() { if (!IsModuleInstalled('intranet') || defined('FX_CRONTAB')) // can't get real HTTP server vars from cron return "CSiteCheckerTest::CommonTest();"; IncludeModuleLangFile($_SERVER['DOCUMENT_ROOT'].'/freetrix/modules/main/admin/site_checker.php'); $step = 0; while(true) { if (is_object($oTest)) $ar = $oTest->arTestVars; $oTest = new CSiteCheckerTest($step, $fast = 1); $oTest->arTestVars = $ar; $oTest->host = $_SERVER['HTTP_HOST'] ? $_SERVER['HTTP_HOST'] : 'localhost'; $oTest->ssl = $_SERVER['HTTPS'] == 'on'; $oTest->port = $_SERVER['SERVER_PORT'] ? $_SERVER['SERVER_PORT'] : ($oTest->ssl ? 443 : 80); $oTest->Start(); if ($oTest->result === false) { $ar = Array( "MESSAGE" => GetMessage("MAIN_SC_GOT_ERRORS", array('#LINK#' => "/freetrix/admin/site_checker.php?lang=".LANGUAGE_ID."&express_test=Y")), "TAG" => "SITE_CHECKER", "MODULE_ID" => "MAIN", 'TYPE' => 'ERROR' ); CAdminNotify::Add($ar); break; } if ($oTest->percent >= 100) break; $step++; } return "CSiteCheckerTest::CommonTest();"; }
$valuesToElements = array(); foreach ($propertyValues as $propertyValue) { $variantIdId = $list[$propertyValue['value']]; $valuesToElements[$propertyValue['id_element']][] = $variantIdId; } foreach ($valuesToElements as $elementId => $elementValues) { $iblockElement->SetPropertyValuesEx($elementId, $idIBlock, array($idProperty => $elementValues)); } return true; }; if ($_POST['apply'] == 'Применить') { $iblockID = intval($_POST['selectIblocks']); $propertyID = intval($_POST['selectProperties']); $newTypeIBlock = $_POST['new-type-property-info-block']; $conversionResult = $conversionProperty($propertyID, $iblockID, $newTypeIBlock); $conversionResult && CAdminNotify::Add(array('MESSAGE' => 'Конвертация прошла успешно', 'TAG' => 'save_property_notify', 'MODULE_ID' => 'ws.tools', 'ENABLE_CLOSE' => 'Y')); !$conversionResult && CAdminNotify::Error(array('MESSAGE' => 'Конвертация не прошла успешно', 'TAG' => 'save_property_notify_error', 'MODULE_ID' => 'ws.tools', 'ENABLE_CLOSE' => 'Y')); } require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php"; $jsParams = array(); $types = array(); $rsTypes = \Bitrix\Iblock\TypeLanguageTable::getList(array('filter' => array('LANGUAGE_ID' => LANG))); while ($type = $rsTypes->fetch()) { $types[$type['IBLOCK_TYPE_ID']] = $type['NAME']; } $jsParams['types'] = array('name' => 'selectTypes', 'list' => $types); $iblocks = array(); $rsIblocks = \Bitrix\Iblock\IblockTable::getList(); while ($iblock = $rsIblocks->fetch()) { $iblocks[$iblock['ID']] = array('name' => $iblock['NAME'], 'type' => $iblock['IBLOCK_TYPE_ID']); }
public static function CheckUploaderType($type = "") { if ($GLOBALS["USER"]->CanDoOperation('edit_php')) { if ($type != "form") { CAdminNotify::Add(array("MESSAGE" => GetMessage("P_UPLOADER_TYPE_NOTIFY"), "TAG" => "PHOTOGALLERY_UPLOADER", "MODULE_ID" => "PHOTOGALLERY")); } else { CAdminNotify::DeleteByTag("PHOTOGALLERY_UPLOADER"); } } }
define("SALE_PROC_REC_TIME", 43200); define("SALE_PROC_REC_FREQUENCY", 7200); // Owner ID base name used by CSale<etnity_name>ReportHelper clases for managing the reports. define("SALE_REPORT_OWNER_ID", 'sale'); //cache orders flag for real-time exhange with 1C define("CACHED_b_sale_order", 3600 * 24); global $SALE_TIME_PERIOD_TYPES; $SALE_TIME_PERIOD_TYPES = array("H" => GetMessage("I_PERIOD_HOUR"), "D" => GetMessage("I_PERIOD_DAY"), "W" => GetMessage("I_PERIOD_WEEK"), "M" => GetMessage("I_PERIOD_MONTH"), "Q" => GetMessage("I_PERIOD_QUART"), "S" => GetMessage("I_PERIOD_SEMIYEAR"), "Y" => GetMessage("I_PERIOD_YEAR")); define("SALE_VALUE_PRECISION", 4); define("SALE_WEIGHT_PRECISION", 3); define('BX_SALE_MENU_CATALOG_CLEAR', 'Y'); $GLOBALS["AVAILABLE_ORDER_FIELDS"] = array("ID" => array("COLUMN_NAME" => "ID", "NAME" => GetMessage("SI_ORDER_ID"), "SELECT" => "ID,DATE_INSERT", "CUSTOM" => "Y", "SORT" => "ID"), "LID" => array("COLUMN_NAME" => GetMessage("SI_SITE"), "NAME" => GetMessage("SI_SITE"), "SELECT" => "LID", "CUSTOM" => "N", "SORT" => "LID"), "PERSON_TYPE" => array("COLUMN_NAME" => GetMessage("SI_PAYER_TYPE"), "NAME" => GetMessage("SI_PAYER_TYPE"), "SELECT" => "PERSON_TYPE_ID", "CUSTOM" => "Y", "SORT" => "PERSON_TYPE_ID"), "PAYED" => array("COLUMN_NAME" => GetMessage("SI_PAID"), "NAME" => GetMessage("SI_PAID_ORDER"), "SELECT" => "PAYED,DATE_PAYED,EMP_PAYED_ID", "CUSTOM" => "Y", "SORT" => "PAYED"), "PAY_VOUCHER_NUM" => array("COLUMN_NAME" => GetMessage("SI_NO_PP"), "NAME" => GetMessage("SI_NO_PP_DOC"), "SELECT" => "PAY_VOUCHER_NUM", "CUSTOM" => "N", "SORT" => "PAY_VOUCHER_NUM"), "PAY_VOUCHER_DATE" => array("COLUMN_NAME" => GetMessage("SI_DATE_PP"), "NAME" => GetMessage("SI_DATE_PP_DOC"), "SELECT" => "PAY_VOUCHER_DATE", "CUSTOM" => "N", "SORT" => "PAY_VOUCHER_DATE"), "DELIVERY_DOC_NUM" => array("COLUMN_NAME" => GetMessage("SI_DATE_PP_DELIVERY_DOC_NUM"), "NAME" => GetMessage("SI_DATE_PP_DOC_DELIVERY_DOC_NUM"), "SELECT" => "DELIVERY_DOC_NUM", "CUSTOM" => "N", "SORT" => "DELIVERY_DOC_NUM"), "DELIVERY_DOC_DATE" => array("COLUMN_NAME" => GetMessage("SI_DATE_PP_DELIVERY_DOC_DATE"), "NAME" => GetMessage("SI_DATE_PP_DOC_DELIVERY_DOC_DATE"), "SELECT" => "DELIVERY_DOC_DATE", "CUSTOM" => "N", "SORT" => "DELIVERY_DOC_DATE"), "CANCELED" => array("COLUMN_NAME" => GetMessage("SI_CANCELED"), "NAME" => GetMessage("SI_CANCELED_ORD"), "SELECT" => "CANCELED,DATE_CANCELED,EMP_CANCELED_ID", "CUSTOM" => "Y", "SORT" => "CANCELED"), "STATUS" => array("COLUMN_NAME" => GetMessage("SI_STATUS"), "NAME" => GetMessage("SI_STATUS_ORD"), "SELECT" => "STATUS_ID,DATE_STATUS,EMP_STATUS_ID", "CUSTOM" => "Y", "SORT" => "STATUS_ID"), "PRICE_DELIVERY" => array("COLUMN_NAME" => GetMessage("SI_DELIVERY"), "NAME" => GetMessage("SI_DELIVERY"), "SELECT" => "PRICE_DELIVERY,CURRENCY", "CUSTOM" => "Y", "SORT" => "PRICE_DELIVERY"), "ALLOW_DELIVERY" => array("COLUMN_NAME" => GetMessage("SI_ALLOW_DELIVERY"), "NAME" => GetMessage("SI_ALLOW_DELIVERY1"), "SELECT" => "ALLOW_DELIVERY,DATE_ALLOW_DELIVERY,EMP_ALLOW_DELIVERY_ID", "CUSTOM" => "Y", "SORT" => "ALLOW_DELIVERY"), "PRICE" => array("COLUMN_NAME" => GetMessage("SI_SUM"), "NAME" => GetMessage("SI_SUM_ORD"), "SELECT" => "PRICE,CURRENCY", "CUSTOM" => "Y", "SORT" => "PRICE"), "SUM_PAID" => array("COLUMN_NAME" => GetMessage("SI_SUM_PAID"), "NAME" => GetMessage("SI_SUM_PAID1"), "SELECT" => "SUM_PAID,CURRENCY", "CUSTOM" => "Y", "SORT" => "SUM_PAID"), "USER" => array("COLUMN_NAME" => GetMessage("SI_BUYER"), "NAME" => GetMessage("SI_BUYER"), "SELECT" => "USER_ID", "CUSTOM" => "Y", "SORT" => "USER_ID"), "PAY_SYSTEM" => array("COLUMN_NAME" => GetMessage("SI_PAY_SYS"), "NAME" => GetMessage("SI_PAY_SYS"), "SELECT" => "PAY_SYSTEM_ID", "CUSTOM" => "Y", "SORT" => "PAY_SYSTEM_ID"), "DELIVERY" => array("COLUMN_NAME" => GetMessage("SI_DELIVERY_SYS"), "NAME" => GetMessage("SI_DELIVERY_SYS"), "SELECT" => "DELIVERY_ID", "CUSTOM" => "Y", "SORT" => "DELIVERY_ID"), "DATE_UPDATE" => array("COLUMN_NAME" => GetMessage("SI_DATE_UPDATE"), "NAME" => GetMessage("SI_DATE_UPDATE"), "SELECT" => "DATE_UPDATE", "CUSTOM" => "N", "SORT" => "DATE_UPDATE"), "PS_STATUS" => array("COLUMN_NAME" => GetMessage("SI_PAYMENT_PS"), "NAME" => GetMessage("SI_PS_STATUS"), "SELECT" => "PS_STATUS,PS_RESPONSE_DATE", "CUSTOM" => "N", "SORT" => "PS_STATUS"), "PS_SUM" => array("COLUMN_NAME" => GetMessage("SI_PS_SUM"), "NAME" => GetMessage("SI_PS_SUM1"), "SELECT" => "PS_SUM,PS_CURRENCY", "CUSTOM" => "Y", "SORT" => "PS_SUM"), "TAX_VALUE" => array("COLUMN_NAME" => GetMessage("SI_TAX"), "NAME" => GetMessage("SI_TAX_SUM"), "SELECT" => "TAX_VALUE,CURRENCY", "CUSTOM" => "Y", "SORT" => "TAX_VALUE"), "BASKET" => array("COLUMN_NAME" => GetMessage("SI_ITEMS"), "NAME" => GetMessage("SI_ITEMS_ORD"), "SELECT" => "", "CUSTOM" => "Y", "SORT" => "")); CModule::AddAutoloadClasses("sale", array("sale" => "install/index.php", "CSaleDelivery" => $DBType . "/delivery.php", "CSaleDeliveryHandler" => $DBType . "/delivery_handler.php", "CSaleDeliveryHelper" => "general/delivery_helper.php", "CSaleDelivery2PaySystem" => "general/delivery_2_pay_system.php", "CSaleLocation" => $DBType . "/location.php", "CSaleLocationGroup" => $DBType . "/location_group.php", "CSaleBasket" => $DBType . "/basket.php", "CSaleBasketHelper" => "general/basket_helper.php", "CSaleUser" => $DBType . "/basket.php", "CSaleOrder" => $DBType . "/order.php", "CSaleOrderPropsGroup" => $DBType . "/order_props_group.php", "CSaleOrderPropsVariant" => $DBType . "/order_props_variant.php", "CSaleOrderUserProps" => $DBType . "/order_user_props.php", "CSaleOrderUserPropsValue" => $DBType . "/order_user_props_value.php", "CSaleOrderTax" => $DBType . "/order_tax.php", "CSaleOrderHelper" => "general/order_helper.php", "CSalePaySystem" => $DBType . "/pay_system.php", "CSalePaySystemAction" => $DBType . "/pay_system_action.php", "CSalePaySystemsHelper" => "general/pay_system_helper.php", "CSalePaySystemTarif" => "general/pay_system_tarif.php", "CSaleTax" => $DBType . "/tax.php", "CSaleTaxRate" => $DBType . "/tax_rate.php", "CSalePersonType" => $DBType . "/person_type.php", "CSaleDiscount" => $DBType . "/discount.php", "CSaleBasketDiscountConvert" => "general/step_operations.php", "CSaleDiscountReindex" => "general/step_operations.php", "CSaleDiscountConvertExt" => "general/step_operations.php", "CSaleUserAccount" => $DBType . "/user.php", "CSaleUserTransact" => $DBType . "/user_transact.php", "CSaleUserCards" => $DBType . "/user_cards.php", "CSaleRecurring" => $DBType . "/recurring.php", "CSaleLang" => $DBType . "/settings.php", "CSaleGroupAccessToSite" => $DBType . "/settings.php", "CSaleGroupAccessToFlag" => $DBType . "/settings.php", "CSaleAuxiliary" => $DBType . "/auxiliary.php", "CSaleAffiliate" => $DBType . "/affiliate.php", "CSaleAffiliatePlan" => $DBType . "/affiliate_plan.php", "CSaleAffiliatePlanSection" => $DBType . "/affiliate_plan_section.php", "CSaleAffiliateTier" => $DBType . "/affiliate_tier.php", "CSaleAffiliateTransact" => $DBType . "/affiliate_transact.php", "CSaleExport" => "general/export.php", "CSaleOrderLoader" => "general/order_loader.php", "CSaleMeasure" => "general/measurement.php", "CSaleProduct" => $DBType . "/product.php", "CSaleViewedProduct" => $DBType . "/product.php", "CSaleHelper" => "general/helper.php", "CSaleMobileOrderUtils" => "general/mobile_order.php", "CSaleMobileOrderPull" => "general/mobile_order.php", "CSaleMobileOrderPush" => "general/mobile_order.php", "CSaleMobileOrderFilter" => "general/mobile_order.php", "CBaseSaleReportHelper" => "general/sale_report_helper.php", "CSaleReportSaleOrderHelper" => "general/sale_report_helper.php", "CSaleReportUserHelper" => "general/sale_report_helper.php", "CSaleReportSaleFuserHelper" => "general/sale_report_helper.php", "IBXSaleProductProvider" => "general/product_provider.php", "CSaleStoreBarcode" => $DBType . "/store_barcode.php", "CSaleOrderChange" => $DBType . "/order_change.php", "CSaleOrderChangeFormat" => "general/order_change.php", "\\Bitrix\\Sale\\Internals\\FuserTable" => "lib/internals/fuser.php", "\\Bitrix\\Sale\\FuserTable" => "lib/internals/fuser_old.php", "\\Bitrix\\Sale\\Fuser" => "lib/fuser.php", '\\Bitrix\\Sale\\Internals\\Input\\Manager' => 'lib/internals/input.php', '\\Bitrix\\Sale\\Internals\\Input\\Base' => 'lib/internals/input.php', '\\Bitrix\\Sale\\Internals\\Input\\File' => 'lib/internals/input.php', '\\Bitrix\\Sale\\Internals\\Input\\StringInput' => 'lib/internals/input.php', '\\Bitrix\\Sale\\Internals\\SiteCurrencyTable' => 'lib/internals/sitecurrency.php', 'CSaleStatus' => 'general/status.php', '\\Bitrix\\Sale\\OrderStatus' => 'lib/status.php', '\\Bitrix\\Sale\\DeliveryStatus' => 'lib/status.php', '\\Bitrix\\Sale\\Internals\\StatusTable' => 'lib/internals/status.php', '\\Bitrix\\Sale\\Internals\\StatusLangTable' => 'lib/internals/status_lang.php', '\\Bitrix\\Sale\\Internals\\StatusGroupTaskTable' => 'lib/internals/status_grouptask.php', 'CSaleOrderProps' => 'general/order_props.php', 'CSaleOrderPropsAdapter' => 'general/order_props.php', 'CSaleOrderPropsValue' => 'general/order_props_values.php', '\\Bitrix\\Sale\\PropertyValueCollection' => 'lib/propertyvaluecollection.php', '\\Bitrix\\Sale\\Internals\\OrderPropsTable' => 'lib/internals/orderprops.php', '\\Bitrix\\Sale\\Internals\\OrderPropsGroupTable' => 'lib/internals/orderprops_group.php', '\\Bitrix\\Sale\\Internals\\OrderPropsValueTable' => 'lib/internals/orderprops_value.php', '\\Bitrix\\Sale\\Internals\\OrderPropsVariantTable' => 'lib/internals/orderprops_variant.php', '\\Bitrix\\Sale\\Internals\\OrderPropsRelationTable' => 'lib/internals/orderprops_relation.php', '\\Bitrix\\Sale\\Internals\\UserPropsValueTable' => 'lib/internals/userpropsvalue.php', '\\Bitrix\\Sale\\Internals\\UserPropsTable' => 'lib/internals/userprops.php', '\\Bitrix\\Sale\\BusinessValue' => 'lib/businessvalue.php', '\\Bitrix\\Sale\\IBusinessValueProvider' => 'lib/businessvalueproviderinterface.php', '\\Bitrix\\Sale\\Internals\\BusinessValueTable' => 'lib/internals/businessvalue.php', '\\Bitrix\\Sale\\Internals\\BusinessValuePersonDomainTable' => 'lib/internals/businessvalue_persondomain.php', '\\Bitrix\\Sale\\Internals\\BusinessValueCode1CTable' => 'lib/internals/businessvalue_code_1c.php', '\\Bitrix\\Sale\\Internals\\PaySystemActionTable' => 'lib/internals/paysystemaction.php', '\\Bitrix\\Sale\\Internals\\PaySystemInner' => 'lib/internals/paysysteminner.php', '\\Bitrix\\Sale\\Internals\\DeliveryPaySystemTable' => 'lib/internals/delivery_paysystem.php', '\\Bitrix\\Sale\\UserMessageException' => 'lib/exception.php', "Bitrix\\Sale\\Internals\\DeliveryHandlerTable" => "lib/internals/deliveryhandler.php", "Bitrix\\Sale\\DeliveryHandlerTable" => "lib/internals/deliveryhandler_old.php", "\\Bitrix\\Sale\\Configuration" => "lib/configuration.php", "\\Bitrix\\Sale\\Order" => "lib/order.php", "\\Bitrix\\Sale\\PersonType" => "lib/persontype.php", "CSaleReportSaleGoodsHelper" => "general/sale_report_helper.php", "CSaleReportSaleProductHelper" => "general/sale_report_helper.php", "Bitrix\\Sale\\ProductTable" => "lib/internals/product_old.php", "\\Bitrix\\Sale\\ProductTable" => "lib/internals/product_old.php", "\\Bitrix\\Sale\\Internals\\ProductTable" => "lib/internals/product.php", "Bitrix\\Sale\\GoodsSectionTable" => "lib/internals/goodssection_old.php", "\\Bitrix\\Sale\\GoodsSectionTable" => "lib/internals/goodssection_old.php", "\\Bitrix\\Sale\\Internals\\GoodsSectionTable" => "lib/internals/goodssection.php", "Bitrix\\Sale\\SectionTable" => "lib/internals/section_old.php", "\\Bitrix\\Sale\\SectionTable" => "lib/internals/section_old.php", "\\Bitrix\\Sale\\Internals\\SectionTable" => "lib/internals/section.php", "\\Bitrix\\Sale\\Internals\\StoreProductTable" => "lib/internals/storeproduct.php", "\\Bitrix\\Sale\\StoreProductTable" => "lib/internals/storeproduct_old.php", "\\Bitrix\\Sale\\SalesZone" => "lib/saleszone.php", "Bitrix\\Sale\\Internals\\OrderDeliveryReqTable" => "lib/internals/orderdeliveryreq.php", "\\Bitrix\\Sale\\Internals\\OrderDeliveryReqTable" => "lib/internals/orderdeliveryreq.php", "Bitrix\\Sale\\SenderEventHandler" => "lib/senderconnector.php", "Bitrix\\Sale\\SenderConnectorBuyer" => "lib/senderconnector.php", "\\Bitrix\\Sale\\Product2ProductTable" => "lib/internals/product2product_old.php", "\\Bitrix\\Sale\\Internals\\Product2ProductTable" => "lib/internals/product2product.php", "Bitrix\\Sale\\OrderProcessingTable" => "lib/internals/orderprocessing_old.php", "Bitrix\\Sale\\Internals\\OrderProcessingTable" => "lib/internals/orderprocessing.php", "\\Bitrix\\Sale\\OrderBase" => "lib/orderbase.php", "\\Bitrix\\Sale\\Internals\\Entity" => "lib/internals/entity.php", "\\Bitrix\\Sale\\Internals\\EntityCollection" => "lib/internals/entitycollection.php", "\\Bitrix\\Sale\\Internals\\CollectionBase" => "lib/internals/collectionbase.php", "\\Bitrix\\Sale\\Shipment" => "lib/shipment.php", "\\Bitrix\\Sale\\ShipmentCollection" => "lib/shipmentcollection.php", "\\Bitrix\\Sale\\ShipmentItemCollection" => "lib/shipmentitemcollection.php", "\\Bitrix\\Sale\\ShipmentItem" => "lib/shipmentitem.php", "\\Bitrix\\Sale\\ShipmentItemStoreCollection" => "lib/shipmentitemstorecollection.php", "\\Bitrix\\Sale\\ShipmentItemStore" => "lib/shipmentitemstore.php", "\\Bitrix\\Sale\\PaymentCollectionBase" => "lib/internals/paymentcollectionbase.php", "\\Bitrix\\Sale\\PaymentCollection" => "lib/paymentcollection.php", "\\Bitrix\\Sale\\Payment" => "lib/payment.php", "\\Bitrix\\Sale\\PaysystemService" => "lib/paysystemservice.php", "\\Bitrix\\Sale\\Internals\\Fields" => "lib/internals/fields.php", "\\Bitrix\\Sale\\Result" => "lib/result.php", "\\Bitrix\\Sale\\ResultError" => "lib/result.php", "\\Bitrix\\Sale\\EventActions" => "lib/eventactions.php", "\\Bitrix\\Sale\\Internals\\PaymentBase" => "lib/internals/paymentbase.php", "\\Bitrix\\Sale\\BasketBase" => "lib/basketbase.php", "\\Bitrix\\Sale\\BasketItemBase" => "lib/basketitembase.php", "\\Bitrix\\Sale\\Basket" => "lib/basket.php", "\\Bitrix\\Sale\\Internals\\BasketItemBase" => "lib/internals/basketitembase.php", "\\Bitrix\\Sale\\BasketItem" => "lib/basketitem.php", "\\Bitrix\\Sale\\BasketBundleCollection" => "lib/basketbundlecollection.php", "\\Bitrix\\Sale\\OrderProperties" => "lib/orderprops.php", "\\Bitrix\\Sale\\PropertyValue" => "lib/propertyvalue.php", "\\Bitrix\\Sale\\Compatible\\Internals\\EntityCompatibility" => "lib/compatible/internals/entitycompatibility.php", "\\Bitrix\\Sale\\Compatible\\OrderCompatibility" => "lib/compatible/ordercompatibility.php", "\\Bitrix\\Sale\\Compatible\\BasketCompatibility" => "lib/compatible/basketcompatibility.php", "\\Bitrix\\Sale\\Compatible\\EventCompatibility" => "lib/compatible/eventcompatibility.php", '\\Bitrix\\Sale\\Compatible\\OrderQuery' => 'lib/compatible/compatible.php', '\\Bitrix\\Sale\\Compatible\\OrderQueryLocation' => 'lib/compatible/compatible.php', '\\Bitrix\\Sale\\Compatible\\FetchAdapter' => 'lib/compatible/compatible.php', '\\Bitrix\\Sale\\Compatible\\Test' => 'lib/compatible/compatible.php', "\\Bitrix\\Sale\\OrderUserProperties" => "lib/userprops.php", "\\Bitrix\\Sale\\BasketPropertiesCollection" => "lib/basketproperties.php", "\\Bitrix\\Sale\\BasketPropertyItem" => "lib/basketpropertiesitem.php", "\\Bitrix\\Sale\\Tax" => "lib/tax.php", "\\Bitrix\\Sale\\Internals\\OrderTable" => "lib/internals/order.php", "\\Bitrix\\Sale\\OrderTable" => "lib/internals/order_old.php", "\\Bitrix\\Sale\\Internals\\BasketTable" => "lib/internals/basket.php", "\\Bitrix\\Sale\\Internals\\ShipmentTable" => "lib/internals/shipment.php", "\\Bitrix\\Sale\\Internals\\ShipmentItemTable" => "lib/internals/shipmentitem.php", "\\Bitrix\\Sale\\Internals\\PaySystemServiceTable" => "lib/internals/paysystemservice.php", "\\Bitrix\\Sale\\Internals\\PaymentTable" => "lib/internals/payment.php", "\\Bitrix\\Sale\\Internals\\PaySystemTable" => "lib/internals/paysystem.php", "\\Bitrix\\Sale\\PaySystemTable" => "lib/internals/paysystem_old.php", "\\Bitrix\\Sale\\Internals\\ShipmentItemStoreTable" => "lib/internals/shipmentitemstore.php", "\\Bitrix\\Sale\\Internals\\ShipmentExtraService" => "lib/internals/shipmentextraservice.php", "\\Bitrix\\Sale\\Internals\\OrderUserPropertiesTable" => "lib/internals/userprops.php", "\\Bitrix\\Sale\\Internals\\CollectableEntity" => "lib/internals/collectableentity.php", "\\Bitrix\\Sale\\Provider" => "lib/provider.php", "\\Bitrix\\Sale\\ProviderBase" => "lib/providerbase.php", "\\Bitrix\\Sale\\OrderHistory" => "lib/orderhistory.php", "\\Bitrix\\Sale\\Internals\\ProviderBasketCollection" => "lib/providerbasketcollection.php", "\\Bitrix\\Sale\\Internals\\ProviderBasketItem" => "lib/providerbasketitem.php", "\\Bitrix\\Sale\\Internals\\BasketPropertyTable" => "lib/internals/basketproperties.php", "\\Bitrix\\Sale\\Internals\\CompanyTable" => "lib/internals/company.php", "\\Bitrix\\Sale\\Internals\\PersonTypeTable" => "lib/internals/persontype.php", "\\Bitrix\\Sale\\PersonTypeTable" => "lib/internals/persontype_old.php", "\\Bitrix\\Sale\\Internals\\PersonTypeSiteTable" => "lib/internals/persontypesite.php", "\\Bitrix\\Sale\\Internals\\Pool" => "lib/internals/pool.php", "\\Bitrix\\Sale\\Internals\\UserBudgetPool" => "lib/internals/userbudgetpool.php", "\\Bitrix\\Sale\\Internals\\EventsPool" => "lib/internals/eventspool.php", "\\Bitrix\\Sale\\Internals\\Events" => "lib/internals/events.php", "\\Bitrix\\Sale\\PriceMaths" => "lib/pricemaths.php", "IPaymentOrder" => "lib/internals/paymentinterface.php", "IShipmentOrder" => "lib/internals/shipmentinterface.php", "Bitrix\\Sale\\Tax\\RateTable" => "lib/tax/rate.php", "Bitrix\\Sale\\Location\\LocationTable" => "lib/location/location.php", "Bitrix\\Sale\\Location\\Tree" => "lib/location/tree.php", "Bitrix\\Sale\\Location\\TypeTable" => "lib/location/type.php", "Bitrix\\Sale\\Location\\GroupTable" => "lib/location/group.php", "Bitrix\\Sale\\Location\\ExternalTable" => "lib/location/external.php", "Bitrix\\Sale\\Location\\ExternalServiceTable" => "lib/location/externalservice.php", "Bitrix\\Sale\\Location\\Search\\Finder" => "lib/location/search/finder.php", "Bitrix\\Sale\\Location\\Search\\WordTable" => "lib/location/search/word.php", "Bitrix\\Sale\\Location\\Search\\ChainTable" => "lib/location/search/chain.php", "Bitrix\\Sale\\Location\\Search\\SiteLinkTable" => "lib/location/search/sitelink.php", "Bitrix\\Sale\\Location\\Name\\NameEntity" => "lib/location/name/nameentity.php", "Bitrix\\Sale\\Location\\Name\\LocationTable" => "lib/location/name/location.php", "Bitrix\\Sale\\Location\\Name\\TypeTable" => "lib/location/name/type.php", "Bitrix\\Sale\\Location\\Name\\GroupTable" => "lib/location/name/group.php", "Bitrix\\Sale\\Location\\Connector" => "lib/location/connector.php", "Bitrix\\Sale\\Location\\GroupLocationTable" => "lib/location/grouplocation.php", "Bitrix\\Sale\\Location\\SiteLocationTable" => "lib/location/sitelocation.php", "Bitrix\\Sale\\Location\\DefaultSiteTable" => "lib/location/defaultsite.php", "Bitrix\\Sale\\Location\\DB\\CommonHelper" => "lib/location/db/commonhelper.php", "Bitrix\\Sale\\Location\\DB\\Helper" => "lib/location/db/" . ToLower($DBType) . "/helper.php", "Bitrix\\Sale\\Location\\DB\\BlockInserter" => "lib/location/db/blockinserter.php", "Bitrix\\Sale\\Location\\Admin\\Helper" => "lib/location/admin/helper.php", "Bitrix\\Sale\\Location\\Admin\\NameHelper" => "lib/location/admin/namehelper.php", "Bitrix\\Sale\\Location\\Admin\\LocationHelper" => "lib/location/admin/locationhelper.php", "Bitrix\\Sale\\Location\\Admin\\TypeHelper" => "lib/location/admin/typehelper.php", "Bitrix\\Sale\\Location\\Admin\\GroupHelper" => "lib/location/admin/grouphelper.php", "Bitrix\\Sale\\Location\\Admin\\DefaultSiteHelper" => "lib/location/admin/defaultsitehelper.php", "Bitrix\\Sale\\Location\\Admin\\SiteLocationHelper" => "lib/location/admin/sitelocationhelper.php", "Bitrix\\Sale\\Location\\Admin\\ExternalServiceHelper" => "lib/location/admin/externalservicehelper.php", "Bitrix\\Sale\\Location\\Admin\\SearchHelper" => "lib/location/admin/searchhelper.php", "Bitrix\\Sale\\Location\\Util\\Process" => "lib/location/util/process.php", "Bitrix\\Sale\\Location\\Util\\CSVReader" => "lib/location/util/csvreader.php", "Bitrix\\Sale\\Location\\Util\\Assert" => "lib/location/util/assert.php", "Bitrix\\Sale\\Location\\Import\\ImportProcess" => "lib/location/import/importprocess.php", "Bitrix\\Sale\\Location\\Search\\ReindexProcess" => "lib/location/search/reindexprocess.php", "\\Bitrix\\Sale\\Location\\Tree\\NodeNotFoundException" => "lib/location/tree/exception.php", "\\Bitrix\\Sale\\Location\\Tree\\NodeIncorrectException" => "lib/location/tree/exception.php", "CSaleProxyAdminResult" => "general/proxyadminresult.php", "CSaleProxyResult" => "general/proxyresult.php", "Bitrix\\Sale\\Location\\Migration\\CUpdaterLocationPro" => "lib/location/migration/migrate.php", "Bitrix\\Sale\\Delivery\\DeliveryLocationTable" => "lib/delivery/deliverylocation.php", "Bitrix\\Sale\\Tax\\RateLocationTable" => "lib/tax/ratelocation.php", "CSaleBasketFilter" => "general/sale_cond.php", "CSaleCondCtrl" => "general/sale_cond.php", "CSaleCondCtrlComplex" => "general/sale_cond.php", "CSaleCondCtrlGroup" => "general/sale_cond.php", "CSaleCondCtrlBasketGroup" => "general/sale_cond.php", "CSaleCondCtrlBasketFields" => "general/sale_cond.php", "CSaleCondCtrlBasketProps" => "general/sale_cond.php", "CSaleCondCtrlOrderFields" => "general/sale_cond.php", "CSaleCondCtrlCommon" => "general/sale_cond.php", "CSaleCondTree" => "general/sale_cond.php", "CSaleActionCtrl" => "general/sale_act.php", "CSaleActionCtrlGroup" => "general/sale_act.php", "CSaleActionCtrlAction" => "general/sale_act.php", "CSaleDiscountActionApply" => "general/sale_act.php", "CSaleActionCtrlDelivery" => "general/sale_act.php", "CSaleActionGift" => "general/sale_act.php", "CSaleActionGiftCtrlGroup" => "general/sale_act.php", "CSaleActionCtrlBasketGroup" => "general/sale_act.php", "CSaleActionCtrlSubGroup" => "general/sale_act.php", "CSaleActionCondCtrlBasketFields" => "general/sale_act.php", "CSaleActionTree" => "general/sale_act.php", "CSaleDiscountConvert" => "general/discount_convert.php", "CSalePdf" => "general/pdf.php", "CSaleYMHandler" => "general/ym_handler.php", "CSaleYMLocation" => "general/ym_location.php", "Bitrix\\Sale\\Delivery\\CalculationResult" => "lib/delivery/calculationresult.php", "Bitrix\\Sale\\Delivery\\Services\\Table" => "lib/delivery/services/table.php", "Bitrix\\Sale\\Delivery\\Restrictions\\Table" => "lib/delivery/restrictions/table.php", "Bitrix\\Sale\\Delivery\\Services\\Manager" => "lib/delivery/services/manager.php", "Bitrix\\Sale\\Delivery\\Restrictions\\Base" => "lib/delivery/restrictions/base.php", "Bitrix\\Sale\\Delivery\\Restrictions\\Manager" => "lib/delivery/restrictions/manager.php", "Bitrix\\Sale\\Delivery\\Services\\Base" => "lib/delivery/services/base.php", "Bitrix\\Sale\\Delivery\\Menu" => "lib/delivery/menu.php", '\\Bitrix\\Sale\\TradingPlatformTable' => 'lib/internals/tradingplatform.php', '\\Bitrix\\Sale\\TradingPlatform\\Ebay\\Policy' => 'lib/tradingplatform/ebay/policy.php', '\\Bitrix\\Sale\\TradingPlatform\\Helper' => 'lib/tradingplatform/helper.php', '\\Bitrix\\Sale\\TradingPlatform\\YandexMarket' => 'lib/tradingplatform/yandex_market.php', 'Bitrix\\Sale\\Internals\\ShipmentExtraServiceTable' => 'lib/internals/shipmentextraservice.php', 'Bitrix\\Sale\\Delivery\\ExtraServices\\Manager' => 'lib/delivery/extra_services/manager.php', 'Bitrix\\Sale\\Delivery\\ExtraServices\\Base' => 'lib/delivery/extra_services/base.php', 'Bitrix\\Sale\\Delivery\\ExtraServices\\Table' => 'lib/delivery/extra_services/table.php', 'Bitrix\\Sale\\Delivery\\Tracking\\Manager' => 'lib/delivery/tracking/manager.php', 'Bitrix\\Sale\\Delivery\\Tracking\\Table' => 'lib/delivery/tracking/table.php', 'Bitrix\\Sale\\Delivery\\ExternalLocationMap' => 'lib/delivery/externallocationmap.php', 'Bitrix\\Sale\\Internals\\ServiceRestrictionTable' => 'lib/internals/servicerestriction.php', 'Bitrix\\Sale\\Services\\Base\\RestrictionManager' => 'lib/services/base/restrictionmanager.php', '\\Bitrix\\Sale\\Compatible\\DiscountCompatibility' => 'lib/compatible/discountcompatibility.php', '\\Bitrix\\Sale\\Discount\\Gift\\Collection' => 'lib/discount/gift/collection.php', '\\Bitrix\\Sale\\Discount\\Gift\\Gift' => 'lib/discount/gift/gift.php', '\\Bitrix\\Sale\\Discount\\Gift\\Manager' => 'lib/discount/gift/manager.php', '\\Bitrix\\Sale\\Discount\\Gift\\RelatedDataTable' => 'lib/discount/gift/relateddata.php', '\\Bitrix\\Sale\\Discount\\Actions' => 'lib/discount/actions.php', '\\Bitrix\\Sale\\Internals\\DiscountTable' => 'lib/internals/discount.php', '\\Bitrix\\Sale\\Internals\\DiscountCouponTable' => 'lib/internals/discountcoupon.php', '\\Bitrix\\Sale\\Internals\\DiscountEntitiesTable' => 'lib/internals/discountentities.php', '\\Bitrix\\Sale\\Internals\\DiscountGroupTable' => 'lib/internals/discountgroup.php', '\\Bitrix\\Sale\\Internals\\DiscountModuleTable' => 'lib/internals/discountmodule.php', '\\Bitrix\\sale\\Internals\\OrderDiscountTable' => 'lib/internals/orderdiscount.php', '\\Bitrix\\Sale\\Internals\\OrderDiscountDataTable' => 'lib/internals/orderdiscount.php', '\\Bitrix\\sale\\Internals\\OrderCouponsTable' => 'lib/internals/orderdiscount.php', '\\Bitrix\\sale\\Internals\\OrderModulesTable' => 'lib/internals/orderdiscount.php', '\\Bitrix\\sale\\Internals\\OrderRulesTable' => 'lib/internals/orderdiscount.php', '\\Bitrix\\Sale\\Internals\\OrderRulesDescrTable' => 'lib/internals/orderdiscount.php', '\\Bitrix\\Sale\\Internals\\AccountNumberGenerator' => 'lib/internals/accountnumber.php', '\\Bitrix\\Sale\\Discount' => 'lib/discount.php', '\\Bitrix\\Sale\\DiscountCouponsManager' => 'lib/discountcoupon.php', '\\Bitrix\\Sale\\OrderDiscountManager' => 'lib/orderdiscount.php', '\\Bitrix\\Sale\\PaySystem\\Service' => 'lib/paysystem/service.php', '\\Bitrix\\Sale\\PaySystem\\Manager' => 'lib/paysystem/manager.php', '\\Bitrix\\Sale\\PaySystem\\BaseServiceHandler' => 'lib/paysystem/baseservicehandler.php', '\\Bitrix\\Sale\\PaySystem\\ServiceHandler' => 'lib/paysystem/servicehandler.php', '\\Bitrix\\Sale\\PaySystem\\IRefund' => 'lib/paysystem/irefund.php', '\\Bitrix\\Sale\\PaySystem\\IPayable' => 'lib/paysystem/ipayable.php', '\\Bitrix\\Sale\\PaySystem\\ICheckable' => 'lib/paysystem/icheckable.php', '\\Bitrix\\Sale\\PaySystem\\IPrePayable' => 'lib/paysystem/iprepayable.php', '\\Bitrix\\Sale\\PaySystem\\CompatibilityHandler' => 'lib/paysystem/compatibilityhandler.php', '\\Bitrix\\Sale\\PaySystem\\IHold' => 'lib/paysystem/ihold.php', '\\Bitrix\\Sale\\Internals\\PaymentLogTable' => 'lib/internals/paymentlog.php', '\\Bitrix\\Sale\\Services\\PaySystem\\Restrictions\\Manager' => 'lib/services/paysystem/restrictions/manager.php', '\\Bitrix\\Sale\\Services\\Base\\Restriction' => 'lib/services/base/restriction.php', '\\Bitrix\\Sale\\Services\\Base\\RestrictionManager' => 'lib/services/base/restrictionmanager.php', '\\Bitrix\\Sale\\Notify' => 'lib/notify.php')); $psConverted = \Bitrix\Main\Config\Option::get('main', '~sale_paysystem_converted'); if ($psConverted == '') { CAdminNotify::Add(array("MESSAGE" => GetMessage("SALE_PAYSYSTEM_CONVERT_ERROR", array('#LANG#' => LANGUAGE_ID)), "TAG" => "SALE_PAYSYSTEM_CONVERT_ERROR", "MODULE_ID" => "sale", "ENABLE_CLOSE" => "Y", "PUBLIC_SECTION" => "N")); } function GetBasketListSimple($bSkipFUserInit = true) { $fUserID = (int) CSaleBasket::GetBasketUserID($bSkipFUserInit); if ($fUserID > 0) { return CSaleBasket::GetList(array("NAME" => "ASC"), array("FUSER_ID" => $fUserID, "LID" => SITE_ID, "ORDER_ID" => "NULL")); } else { return False; } } function GetBasketList($bSkipFUserInit = true) { $fUserID = (int) CSaleBasket::GetBasketUserID($bSkipFUserInit); $arRes = array(); if ($fUserID > 0) {