function DoInstall() { RegisterModule($this->MODULE_ID); CModule::IncludeModule($this->MODULE_ID); // ... global $DB; $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".$this->MODULE_ID."/install/db/".strtolower($DB->type)."/install.sql"); }
function InstallDB($install_wizard = true) { global $DB, $DBType, $APPLICATION; RegisterModule("bitrix.eshop"); RegisterModuleDependences("main", "OnBeforeProlog", "bitrix.eshop", "CEShop", "ShowPanel"); return true; }
function DoInstall() { global $DOCUMENT_ROOT, $APPLICATION; $this->InstallFiles(); RegisterModule("shackijj.responsiveslider"); $APPLICATION->IncludeAdminFile(GetMessage("RS_INSTALL_RESULT"), $DOCUMENT_ROOT . "/bitrix/modules/shackijj.responsiveslider/install/step.php"); }
function InstallDB($arParams = array()) { global $DB, $APPLICATION; $EMPTY = false; $errors = false; if (!$DB->Query("SELECT 'x' FROM b_ticket", true)) { $EMPTY = true; } if ($EMPTY) { $errors = $DB->RunSQLBatch($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/support/install/db/' . strtolower($DB->type) . '/install.sql'); } if (is_array($errors)) { $APPLICATION->ThrowException(implode(' ', $errors)); return false; } RegisterModule('support'); RegisterModuleDependences('mail', 'OnGetFilterList', 'support', 'CSupportEMail', 'OnGetFilterList'); CAgent::RemoveModuleAgents("support"); CAgent::AddAgent("CTicketReminder::AgentFunction();", "support", "N", 60); CAgent::AddAgent('CTicket::CleanUpOnline();', 'support', 'N'); CAgent::AddAgent('CTicket::AutoClose();', 'support', 'N'); if ($EMPTY) { if ($arParams['admin'] == 'Y') { $this->InstallEvents(); } if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/support/install/demodata.php')) { $DD_ERROR = false; include $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/support/install/demodata.php'; if ($DD_ERROR) { return false; } } } return true; }
function InstallDB($arParams = array()) { global $DB, $DBType, $APPLICATION; $this->errors = false; // Database tables creation if (!$DB->Query("SELECT 'x' FROM b_sec_iprule WHERE 1=0", true)) { $this->errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/security/install/db/" . strtolower($DB->type) . "/install.sql"); } if ($this->errors !== false) { $APPLICATION->ThrowException(implode("<br>", $this->errors)); return false; } else { $this->InstallTasks(); RegisterModule("security"); RegisterModuleDependences("main", "OnUserDelete", "security", "CSecurityUser", "OnUserDelete"); RegisterModuleDependences("main", "OnEventLogGetAuditTypes", "security", "CSecurityFilter", "GetAuditTypes"); RegisterModuleDependences("main", "OnEventLogGetAuditTypes", "security", "CSecurityAntiVirus", "GetAuditTypes"); RegisterModuleDependences("main", "OnAdminInformerInsertItems", "security", "CSecurityFilter", "OnAdminInformerInsertItems"); RegisterModuleDependences("main", "OnAdminInformerInsertItems", "security", "CSecuritySiteChecker", "OnAdminInformerInsertItems"); CModule::IncludeModule("security"); //agents CAgent::RemoveAgent("CSecuritySession::CleanUpAgent();", "security"); CAgent::Add(array("NAME" => "CSecuritySession::CleanUpAgent();", "MODULE_ID" => "security", "ACTIVE" => "Y", "AGENT_INTERVAL" => 1800, "IS_PERIOD" => "N")); CAgent::RemoveAgent("CSecurityIPRule::CleanUpAgent();", "security"); CAgent::Add(array("NAME" => "CSecurityIPRule::CleanUpAgent();", "MODULE_ID" => "security", "ACTIVE" => "Y", "AGENT_INTERVAL" => 3600, "IS_PERIOD" => "N")); if (!COption::GetOptionString("security", "ipcheck_disable_file")) { COption::SetOptionString("security", "ipcheck_disable_file", "/bitrix/modules/ipcheck_disable_" . md5(mt_rand())); } CAgent::RemoveAgent("CSecurityFilter::ClearTmpFiles();", "security"); CSecurityFilter::SetActive(true); CSecurityAntiVirus::SetActive(true); return true; } }
function DoInstall() { global $DOCUMENT_ROOT, $APPLICATION; $this->InstallFiles(); RegisterModule("safin"); $APPLICATION->IncludeAdminFile(GetMessage('install_module'), $DOCUMENT_ROOT . "/bitrix/modules/safin/install/step.php"); }
function InstallDB($arParams = array()) { global $DB, $DBType, $APPLICATION; $this->errors = false; // Database tables creation if (!$DB->Query("SELECT 'x' FROM b_list_rubric WHERE 1=0", true)) { $this->errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/subscribe/install/db/" . $DBType . "/install.sql"); } if ($this->errors !== false) { $APPLICATION->ThrowException(implode("<br>", $this->errors)); return false; } else { RegisterModule("subscribe"); CModule::IncludeModule("subscribe"); RegisterModuleDependences("main", "OnBeforeLangDelete", "subscribe", "CRubric", "OnBeforeLangDelete"); RegisterModuleDependences("main", "OnUserDelete", "subscribe", "CSubscription", "OnUserDelete"); RegisterModuleDependences("main", "OnUserLogout", "subscribe", "CSubscription", "OnUserLogout"); RegisterModuleDependences("main", "OnGroupDelete", "subscribe", "CPosting", "OnGroupDelete"); //agents CAgent::RemoveAgent("CSubscription::CleanUp();", "subscribe"); CTimeZone::Disable(); CAgent::Add(array("NAME" => "CSubscription::CleanUp();", "MODULE_ID" => "subscribe", "ACTIVE" => "Y", "NEXT_EXEC" => date("d.m.Y H:i:s", mktime(3, 0, 0, date("m"), date("j") + 1, date("Y"))), "AGENT_INTERVAL" => 86400, "IS_PERIOD" => "Y")); CTimeZone::Enable(); return true; } }
function InstallDB() { global $DB, $APPLICATION; $this->errors = false; if (!$DB->Query("SELECT 'x' FROM b_pull_stack", true)) { $this->errors = $DB->RunSQLBatch($_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/pull/install/db/" . strtolower($DB->type) . "/install.sql"); } if ($this->errors !== false) { $APPLICATION->ThrowException(implode("", $this->errors)); return false; } RegisterModule("pull"); RegisterModuleDependences("main", "OnProlog", "main", "", "", 3, "/modules/pull/ajax_hit.php"); RegisterModuleDependences("main", "OnEpilog", "pull", "CPullWatch", "DeferredSql"); RegisterModuleDependences("main", "OnEpilog", "pull", "CPullOptions", "OnEpilog"); RegisterModuleDependences("perfmon", "OnGetTableSchema", "pull", "CPullTableSchema", "OnGetTableSchema"); RegisterModuleDependences("main", "OnAfterRegisterModule", "pull", "CPullOptions", "ClearCheckCache"); RegisterModuleDependences("main", "OnAfterUnRegisterModule", "pull", "CPullOptions", "ClearCheckCache"); if (IsModuleInstalled('intranet')) { RegisterModuleDependences("main", "OnAfterUserAuthorize", "pull", "CPullChannel", "OnAfterUserAuthorize"); RegisterModuleDependences("main", "OnAfterUserLogout", "pull", "CPullChannel", "OnAfterUserLogout"); } CAgent::AddAgent("CPullOptions::ClearAgent();", "pull", "N", 30, "", "Y", ConvertTimeStamp(time() + CTimeZone::GetOffset() + 30, "FULL")); return true; }
function InstallDB() { RegisterModule($this->MODULE_ID); // региструем код, который будет выполняться OnProlog RegisterModuleDependences("main", "OnProlog", $this->MODULE_ID, "TestModuleOnPageLoad", "testModuleMainHandler"); return true; }
function DoInstall() { CopyDirFiles($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/' . self::MODULE_ID . '/install/public_html/', $_SERVER['DOCUMENT_ROOT'] . '/bitrix/', true, true); RegisterModuleDependences('iblock', 'OnIBlockPropertyBuildList', self::MODULE_ID, 'UserDataColor', 'GetIBlockPropertyDescription'); // RegisterModuleDependences('main', 'OnUserTypeBuildList', self::MODULE_ID, 'UserDataColor', 'GetUserTypeDescription'); RegisterModule(self::MODULE_ID); }
function InstallEvents() { RegisterModule("refreshlab.err404"); RegisterModuleDependences("main", "OnEpilog", "refreshlab.err404", "CErr404", "handler404", 10000); return true; }
function InstallDB($arParams = array()) { global $DB, $DBType, $APPLICATION; $this->errors = false; // Database tables creation if (!$DB->Query("SELECT 'x' FROM b_cluster_dbnode WHERE 1=0", true)) { $this->errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/cluster/install/db/" . strtolower($DB->type) . "/install.sql"); if ($DB->type == "MSSQL") { $DB->Query("SET IDENTITY_INSERT B_CLUSTER_GROUP ON"); } $DB->Add("b_cluster_group", array("ID" => 1, "NAME" => GetMessage("CLU_GROUP_NO_ONE"))); if ($DB->type == "MSSQL") { $DB->Query("SET IDENTITY_INSERT B_CLUSTER_GROUP OFF"); } if ($DB->type == "MSSQL") { $DB->Query("SET IDENTITY_INSERT B_CLUSTER_DBNODE ON"); } $DB->Add("b_cluster_dbnode", array("ID" => 1, "GROUP_ID" => 1, "ACTIVE" => "Y", "ROLE_ID" => "MAIN", "NAME" => GetMessage("CLU_MAIN_DATABASE"), "DESCRIPTION" => false, "DB_HOST" => false, "DB_NAME" => false, "DB_LOGIN" => false, "DB_PASSWORD" => false, "MASTER_ID" => false, "SERVER_ID" => false, "STATUS" => "ONLINE")); if ($DB->type == "MSSQL") { $DB->Query("SET IDENTITY_INSERT B_CLUSTER_DBNODE OFF"); } } if ($this->errors !== false) { $APPLICATION->ThrowException(implode("<br>", $this->errors)); return false; } else { RegisterModule("cluster"); CModule::IncludeModule("cluster"); return true; } }
function DoInstall() { global $DOCUMENT_ROOT, $APPLICATION; $this->InstallDb(); RegisterModule("sanikeev"); $APPLICATION->IncludeAdminFile("Установка модуля sanikeev_module", $DOCUMENT_ROOT . "/local/modules/sanikeev/install/step.php"); }
function DoInstall() { global $DOCUMENT_ROOT, $APPLICATION; $this->InstallFiles(); RegisterModule("slyblocksmodule"); $APPLICATION->IncludeAdminFile("”становка модул¤ »нтерактивные блоки", $DOCUMENT_ROOT."/bitrix/modules/slyblocksmodule/install/step.php"); }
public function InstallDB() { global $APPLICATION, $DB, $DBType, $errors; RegisterModuleDependences('sale', 'OnSaleComponentOrderOneStepProcess', $this->MODULE_ID, 'CDadataSuggestions', 'OnSaleComponentOrderOneStepProcess'); RegisterModule($this->MODULE_ID); return true; }
function DoInstall(){ global $DOCUMENT_ROOT, $APPLICATION; $this->InstallFiles(); $this->InstallDB(); RegisterModule("pbrf"); $APPLICATION->IncludeAdminFile("Установка модуля pbrf", $DOCUMENT_ROOT."/bitrix/modules/pbrf/install/step.php"); }
public function DoInstall() { if (is_array($this->NEED_MODULES) && !empty($this->NEED_MODULES)) { foreach ($this->NEED_MODULES as $module) { if (!IsModuleInstalled($module)) { $this->ShowForm('ERROR', GetMessage('ASD_NEED_MODULES', array('#MODULE#' => $module))); } } } if (strlen($this->NEED_MAIN_VERSION) <= 0 || version_compare(SM_VERSION, $this->NEED_MAIN_VERSION) >= 0) { RegisterModuleDependences('main', 'OnAdminListDisplay', 'asd.iblock', 'CASDiblockInterface', 'OnAdminListDisplayHandler'); RegisterModuleDependences('main', 'OnBeforeProlog', 'asd.iblock', 'CASDiblockAction', 'OnBeforePrologHandler'); RegisterModuleDependences('main', 'OnAdminContextMenuShow', 'asd.iblock', 'CASDiblockInterface', 'OnAdminContextMenuShowHandler'); RegisterModuleDependences('main', 'OnAdminTabControlBegin', 'asd.iblock', 'CASDiblockInterface', 'OnAdminTabControlBeginHandler'); RegisterModuleDependences('iblock', 'OnAfterIBlockUpdate', 'asd.iblock', 'CASDiblockAction', 'OnAfterIBlockUpdateHandler'); RegisterModuleDependences('iblock', 'OnIBlockPropertyBuildList', 'asd.iblock', 'CASDiblockPropCheckbox', 'GetUserTypeDescription'); RegisterModuleDependences('iblock', 'OnIBlockPropertyBuildList', 'asd.iblock', 'CASDiblockPropCheckboxNum', 'GetUserTypeDescription'); RegisterModuleDependences('iblock', 'OnIBlockPropertyBuildList', 'asd.iblock', 'CASDiblockPropPalette', 'GetUserTypeDescription'); RegisterModuleDependences('iblock', 'OnIBlockPropertyBuildList', 'asd.iblock', 'CASDiblockPropSection', 'GetUserTypeDescription'); CopyDirFiles($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/asd.iblock/install/js/', $_SERVER['DOCUMENT_ROOT'] . '/bitrix/js/', true, true); CopyDirFiles($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/asd.iblock/install/panel/', $_SERVER['DOCUMENT_ROOT'] . '/bitrix/panel/', true, true); CopyDirFiles($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/asd.iblock/install/tools/', $_SERVER['DOCUMENT_ROOT'] . '/bitrix/tools/', true, true); RegisterModule('asd.iblock'); $this->ShowForm('OK', GetMessage('MOD_INST_OK')); } else { $this->ShowForm('ERROR', GetMessage('ASD_NEED_RIGHT_VER', array('#NEED#' => $this->NEED_MAIN_VERSION))); } }
function DoInstall() { global $APPLICATION; $this->InstallDB(); $this->InstallFiles(); RegisterModule(self::MODULE_ID); }
/** * Registration. */ public function DoInstall() { RegisterModule($this->MODULE_ID); // Register to observe any event, that fired before sending mail. RegisterModuleDependences('main', 'OnPageStart', $this->MODULE_ID, __CLASS__, 'registerTransport'); RegisterModuleDependences('main', 'OnEventLogGetAuditTypes', $this->MODULE_ID, __CLASS__, 'getEventLogAuditTypes'); }
function InstallDB($arParams = array()) { global $DB, $DBType, $APPLICATION; $this->errors = false; // Database tables creation if (!$DB->Query("SELECT 'x' FROM b_clouds_file_bucket WHERE 1=0", true)) { $this->errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/clouds/install/db/" . strtolower($DB->type) . "/install.sql"); } if ($this->errors !== false) { $APPLICATION->ThrowException(implode("<br>", $this->errors)); return false; } else { $this->InstallTasks(); RegisterModule("clouds"); CModule::IncludeModule("clouds"); RegisterModuleDependences("main", "OnEventLogGetAuditTypes", "clouds", "CCloudStorage", "GetAuditTypes"); RegisterModuleDependences("main", "OnBeforeProlog", "clouds", "CCloudStorage", "OnBeforeProlog"); RegisterModuleDependences("main", "OnAdminListDisplay", "clouds", "CCloudStorage", "OnAdminListDisplay"); RegisterModuleDependences("main", "OnBuildGlobalMenu", "clouds", "CCloudStorage", "OnBuildGlobalMenu"); RegisterModuleDependences("main", "OnFileSave", "clouds", "CCloudStorage", "OnFileSave"); RegisterModuleDependences("main", "OnGetFileSRC", "clouds", "CCloudStorage", "OnGetFileSRC"); RegisterModuleDependences("main", "OnFileCopy", "clouds", "CCloudStorage", "OnFileCopy"); RegisterModuleDependences("main", "OnFileDelete", "clouds", "CCloudStorage", "OnFileDelete"); RegisterModuleDependences("main", "OnMakeFileArray", "clouds", "CCloudStorage", "OnMakeFileArray"); RegisterModuleDependences("main", "OnBeforeResizeImage", "clouds", "CCloudStorage", "OnBeforeResizeImage"); RegisterModuleDependences("main", "OnAfterResizeImage", "clouds", "CCloudStorage", "OnAfterResizeImage"); RegisterModuleDependences("clouds", "OnGetStorageService", "clouds", "CCloudStorageService_AmazonS3", "GetObject"); RegisterModuleDependences("clouds", "OnGetStorageService", "clouds", "CCloudStorageService_GoogleStorage", "GetObject"); RegisterModuleDependences("clouds", "OnGetStorageService", "clouds", "CCloudStorageService_OpenStackStorage", "GetObject"); RegisterModuleDependences("clouds", "OnGetStorageService", "clouds", "CCloudStorageService_RackSpaceCloudFiles", "GetObject"); RegisterModuleDependences("clouds", "OnGetStorageService", "clouds", "CCloudStorageService_ClodoRU", "GetObject"); RegisterModuleDependences("clouds", "OnGetStorageService", "clouds", "CCloudStorageService_Selectel", "GetObject"); return true; } }
function InstallDB() { global $DB, $DBType, $APPLICATION; $this->errors = false; RegisterModule(self::MODULE_ID); }
function InstallDB() { global $APPLICATION, $DB, $errors; if (!$DB->Query("SELECT 'x' FROM b_adv_banner", true)) { $EMPTY = "Y"; } else { $EMPTY = "N"; } if ($EMPTY == "Y") { $errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/advertising/install/db/" . strtolower($DB->type) . "/install.sql"); if (!empty($errors)) { $APPLICATION->ThrowException(implode("", $errors)); return false; } } RegisterModule("advertising"); RegisterModuleDependences("main", "OnBeforeProlog", "advertising"); RegisterModuleDependences("main", "OnEndBufferContent", "advertising", "CAdvBanner", "FixShowAll"); RegisterModuleDependences("main", "OnBeforeRestartBuffer", "advertising", "CAdvBanner", "BeforeRestartBuffer"); CAgent::AddAgent("CAdvContract::SendInfo();", "advertising", "N", 7200); CAgent::AddAgent("CAdvBanner::CleanUpDynamics();", "advertising", "N", 86400); if ($EMPTY == "Y") { CModule::IncludeModule('advertising'); $arSites = array(); $rs = CSite::GetList($b = "sort", $o = "asc"); while ($ar = $rs->Fetch()) { $arSites[] = $ar['ID']; } $ac = new CAdvContract(); $arFields = array('ACTIVE' => 'Y', 'NAME' => 'Default', 'SORT' => 10000, 'DESCRIPTION' => 'all site without any restrictions', 'EMAIL_COUNT' => 1, 'arrTYPE' => array('ALL'), 'arrWEEKDAY' => array('MONDAY' => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23), 'SATURDAY' => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23), 'SUNDAY' => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23), 'THURSDAY' => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23), 'TUESDAY' => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23), 'WEDNESDAY' => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23), 'FRIDAY' => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23)), 'arrSITE' => $arSites); $ac->Set($arFields, 0, 'N'); } return true; }
function DoInstall() { global $APPLICATION, $USER, $step, $arSitesList; if ($USER->IsAdmin()) { $arSitesList = array(); $rsSites = CSite::GetList($by = "sort", $order = "desc", array()); while ($arSite = $rsSites->Fetch()) { $arSitesList[$arSite['ID']] = $arSite['NAME']; } $step = IntVal($step); if ($step < 2) { $APPLICATION->IncludeAdminFile(GetMessage("CONTENT_INCLUDER_MODULE_INSTALL_TITLE") . $this->MODULE_ID, $this->sModuleInstallFullPath . "step1.php"); } elseif ($step == 2) { RegisterModule($this->MODULE_ID); RegisterModuleDependences("main", "OnEndBufferContent", $this->MODULE_ID, '\\Bit\\Includer\\Handlers', "OnEndBufferContentHandler"); RegisterModuleDependences("fileman", "OnIncludeHTMLEditorScript", $this->MODULE_ID, '\\Bit\\Includer\\Handlers', "OnIncludeHTMLEditorScriptHandler"); $this->InstallFiles(); $sSiteId = array_key_exists($_REQUEST['site_id'], $arSitesList) ? $_REQUEST['site_id'] : SITE_ID; if ($_REQUEST['install_sample_iblock'] === "Y") { $this->createSampleIblock($sSiteId); } if ($_REQUEST['disable_new_editor'] === "Y") { COption::setOptionString("fileman", "use_editor_3", ""); } COption::SetOptionString("bit.includer", "include_jquery", $_REQUEST['include_jquery_for_component'] === "Y" ? "Y" : "N"); $APPLICATION->IncludeAdminFile(GetMessage("CONTENT_INCLUDER_MODULE_INSTALL_TITLE"), $this->sModuleInstallFullPath . "step2.php"); } } }
function InstallDB($install_wizard = true) { global $DB, $DBType, $APPLICATION; $errors = null; if (!$DB->Query("SELECT 'x' FROM b_disk_storage", true)) { $errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/disk/install/db/" . $DBType . "/install.sql"); } $this->InstallTasks(); if (!empty($errors)) { $APPLICATION->ThrowException(implode("", $errors)); return false; } $isWebdavInstalled = isModuleInstalled('webdav'); $this->RegisterModuleDependences(!$isWebdavInstalled); RegisterModule("disk"); $this->InstallUserFields(); /** @noinspection PhpDynamicAsStaticMethodCallInspection */ CAgent::addAgent('\\Bitrix\\Disk\\ExternalLink::removeExpiredWithTypeAuto();', 'disk', 'N'); /** @noinspection PhpDynamicAsStaticMethodCallInspection */ CAgent::addAgent('\\Bitrix\\Disk\\Bitrix24Disk\\UploadFileManager::removeIrrelevant();', 'disk', 'N'); if (!$isWebdavInstalled) { require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/disk/lib/configuration.php"; \Bitrix\Main\Config\Option::set('disk', 'successfully_converted', 'Y'); \Bitrix\Main\Config\Option::set('disk', 'disk_revision_api', \Bitrix\Disk\Configuration::REVISION_API); } else { \CAdminNotify::add(array("MESSAGE" => Loc::getMessage("DISK_NOTIFY_MIGRATE_WEBDAV", array("#LINK#" => "/bitrix/admin/disk_from_webdav_convertor.php?lang=" . \Bitrix\Main\Application::getInstance()->getContext()->getLanguage())), "TAG" => "disk_migrate_from_webdav", "MODULE_ID" => "disk", "ENABLE_CLOSE" => "N")); } return true; }
function InstallDB($arParams = array()) { global $DB, $DBType, $APPLICATION; $this->errors = false; // Database tables creation $bDBInstall = !$DB->Query("SELECT 'x' FROM b_workflow_document WHERE 1=0", true); if ($bDBInstall) { $this->errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/workflow/install/db/" . $DBType . "/install.sql"); } if ($this->errors !== false) { $APPLICATION->ThrowException(implode("<br>", $this->errors)); return false; } else { RegisterModule("workflow"); CModule::IncludeModule("workflow"); if ($bDBInstall) { $obWorkflowStatus = new CWorkflowStatus(); $obWorkflowStatus->Add(array("~TIMESTAMP_X" => $DB->GetNowFunction(), "C_SORT" => 300, "ACTIVE" => "Y", "TITLE" => GetMessage("FLOW_INSTALL_PUBLISHED"), "IS_FINAL" => "Y", "NOTIFY" => "N")); $obWorkflowStatus->Add(array("~TIMESTAMP_X" => $DB->GetNowFunction(), "C_SORT" => 100, "ACTIVE" => "Y", "TITLE" => GetMessage("FLOW_INSTALL_DRAFT"), "IS_FINAL" => "N", "NOTIFY" => "N")); $obWorkflowStatus->Add(array("~TIMESTAMP_X" => $DB->GetNowFunction(), "C_SORT" => 200, "ACTIVE" => "Y", "TITLE" => GetMessage("FLOW_INSTALL_READY"), "IS_FINAL" => "N", "NOTIFY" => "Y")); } RegisterModuleDependences("main", "OnPanelCreate", "workflow", "CWorkflow", "OnPanelCreate", "200"); RegisterModuleDependences("main", "OnChangeFile", "workflow", "CWorkflow", "OnChangeFile"); //agents CAgent::RemoveAgent("CWorkflow::CleanUp();", "workflow"); CAgent::AddAgent("CWorkflow::CleanUp();", "workflow", "N"); return true; } }
function InstallDB() { global $DB, $DBType, $APPLICATION; if (!$DB->Query("SELECT 'x' FROM b_medialib_collection", true)) { $errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/fileman/install/db/" . $DBType . "/install.sql"); } if (!empty($errors)) { $APPLICATION->ThrowException(implode("", $errors)); return false; } RegisterModule("fileman"); RegisterModuleDependences("main", "OnGroupDelete", "fileman", "CFileman", "OnGroupDelete"); RegisterModuleDependences("main", "OnPanelCreate", "fileman", "CFileman", "OnPanelCreate"); RegisterModuleDependences("main", "OnModuleUpdate", "fileman", "CFileman", "OnModuleUpdate"); RegisterModuleDependences("main", "OnModuleInstalled", "fileman", "CFileman", "ClearComponentsListCache"); RegisterModuleDependences('iblock', 'OnIBlockPropertyBuildList', 'fileman', 'CIBlockPropertyMapGoogle', 'GetUserTypeDescription'); RegisterModuleDependences('iblock', 'OnIBlockPropertyBuildList', 'fileman', 'CIBlockPropertyMapYandex', 'GetUserTypeDescription'); RegisterModuleDependences('iblock', 'OnIBlockPropertyBuildList', 'fileman', 'CIBlockPropertyVideo', 'GetUserTypeDescription'); RegisterModuleDependences("main", "OnUserTypeBuildList", "fileman", "CUserTypeVideo", "GetUserTypeDescription"); RegisterModuleDependences("main", "OnEventLogGetAuditTypes", "fileman", "CEventFileman", "GetAuditTypes"); RegisterModuleDependences("main", "OnEventLogGetAuditHandlers", "fileman", "CEventFileman", "MakeFilemanObject"); require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/fileman/install/tasks/install.php"; // // Add hotkeys // $hkc = new CHotKeysCode; // $id = $hkc->Add(array( // CLASS_NAME => "admin_file_edit_apply", // CODE => "if(top.AjaxApply && typeof top.AjaxApply == 'function'){top.AjaxApply();}", // NAME => GetMessage("FILEMAN_HOTKEY_TITLE"), // IS_CUSTOM => "0" // )); // CHotKeys::getInstance()->Add(array("KEYS_STRING"=>"Ctrl+83", "CODE_ID"=>$id, "USER_ID" => 0)); //S return true; }
function InstallDB() { global $DB, $APPLICATION; $this->errors = false; if (!$DB->Query("SELECT 'x' FROM b_seo_keywords", true)) { $this->errors = $DB->RunSQLBatch($_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/seo/install/db/" . strtolower($DB->type) . "/install.sql"); } if ($this->errors !== false) { $APPLICATION->ThrowException(implode("", $this->errors)); return false; } RegisterModule("seo"); require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/seo/install/tasks/install.php"; RegisterModuleDependences('main', 'OnPanelCreate', 'seo', 'CSeoEventHandlers', 'SeoOnPanelCreate'); if (COption::GetOptionString('seo', 'searchers_list', '') == '' && CModule::IncludeModule('statistic')) { $arFilter = array('ACTIVE' => 'Y', 'NAME' => 'Google|MSN|Bing', 'NAME_EXACT_MATCH' => 'Y'); if (COption::GetOptionString('main', 'vendor') == '1c_bitrix') { $arFilter['NAME'] .= '|Yandex'; } $strSearchers = ''; $dbRes = CSearcher::GetList($by = 's_id', $order = 'asc', $arFilter, $is_filtered); while ($arRes = $dbRes->Fetch()) { $strSearchers .= ($strSearchers == '' ? '' : ',') . $arRes['ID']; } COption::SetOptionString('seo', 'searchers_list', $strSearchers); } return true; }
function InstallDB($install_wizard = true) { global $DB, $DBType, $APPLICATION; $arCurPhpVer = Explode(".", PhpVersion()); if (IntVal($arCurPhpVer[0]) < 5) { return true; } $errors = null; if (!$DB->Query("SELECT 'x' FROM b_bp_workflow_instance", true)) { $errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/bizproc/install/db/" . $DBType . "/install.sql"); } if (!empty($errors)) { $APPLICATION->ThrowException(implode("", $errors)); return false; } RegisterModule("bizproc"); RegisterModuleDependences("iblock", "OnAfterIBlockElementDelete", "bizproc", "CBPVirtualDocument", "OnAfterIBlockElementDelete"); RegisterModuleDependences("main", "OnAdminInformerInsertItems", "bizproc", "CBPAllTaskService", "OnAdminInformerInsertItems"); RegisterModuleDependences('rest', 'OnRestServiceBuildDescription', 'bizproc', '\\Bitrix\\Bizproc\\RestService', 'onRestServiceBuildDescription'); RegisterModuleDependences('rest', 'OnRestAppDelete', 'bizproc', '\\Bitrix\\Bizproc\\RestService', 'onRestAppDelete'); RegisterModuleDependences('rest', 'OnRestAppUpdate', 'bizproc', '\\Bitrix\\Bizproc\\RestService', 'onRestAppUpdate'); RegisterModuleDependences('timeman', 'OnAfterTMDayStart', 'bizproc', 'CBPDocument', 'onAfterTMDayStart'); COption::SetOptionString("bizproc", "SkipNonPublicCustomTypes", "Y"); return true; }
function DoInstall() { global $APPLICATION, $data; $loc = \WS\Migrations\Module::getInstance()->getLocalization('setup'); $options = \WS\Migrations\Module::getInstance()->getOptions(); global $errors; $errors = array(); if ($data['catalog']) { $dir = $_SERVER['DOCUMENT_ROOT'].$data['catalog']; if (!is_dir($dir)) { mkdir($dir); } if (!is_dir($dir)) { $errors[] = $loc->getDataByPath('error.notCreateDir'); } if (!$errors) { $options->catalogPath = $data['catalog']; } $this->InstallFiles(); $this->InstallDB(); RegisterModule(self::MODULE_ID); \Bitrix\Main\Loader::includeModule(self::MODULE_ID); \Bitrix\Main\Loader::includeModule('iblock'); \WS\Migrations\Module::getInstance()->install(); } if (!$data || $errors) { $APPLICATION->IncludeAdminFile($loc->getDataByPath('title'), __DIR__.'/form.php'); return; } }
function DoInstall() { global $APPLICATION; $this->InstallFiles(); $this->InstallDB(); RegisterModule(self::MODULE_ID); $APPLICATION->IncludeAdminFile(GetMessage("FORM_INSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".self::MODULE_ID."/install/step1.php"); }