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("perfmon", "OnGetTableSchema", "pull", "CPullTableSchema", "OnGetTableSchema"); RegisterModuleDependences("main", "OnAfterRegisterModule", "pull", "CPullOptions", "ClearCheckCache"); RegisterModuleDependences("main", "OnAfterUnRegisterModule", "pull", "CPullOptions", "ClearCheckCache"); COption::SetOptionString("pull", "path_to_listener", (CMain::IsHTTPS() ? "https" : "http")."://#DOMAIN#".(CMain::IsHTTPS() ? ":8894" : ":8893").'/bitrix/sub/'); COption::SetOptionString("pull", "path_to_websocket", (CMain::IsHTTPS() ? "wss" : "ws")."://#DOMAIN#".(CMain::IsHTTPS() ? ":8894" : ":8893").'/bitrix/subws/'); COption::SetOptionString("pull", "path_to_publish", 'http://127.0.0.1:8895/bitrix/pub/'); COption::SetOptionString("pull", "websocket", 'N'); COption::SetOptionString("pull", "nginx", 'N'); COption::SetOptionString("pull", "push", 'N'); CAgent::AddAgent("CPullOptions::ClearAgent();", "pull", "N", 30, "", "Y", ConvertTimeStamp(time()+CTimeZone::GetOffset()+30, "FULL")); return true; }
function DoInstall() { foreach ($this->events as $event) { RegisterModuleDependences($event["from_module"], $event["from_event"], $event["to_module"], $event["to_class"], $event["to_method"]); } RegisterModule($this->MODULE_ID); }
public static function registerListeners() { RegisterModuleDependences("tasks", "OnTaskAdd", "intranet", "\\" . __CLASS__, "onTaskAddEvent"); RegisterModuleDependences("tasks", "OnTaskUpdate", "intranet", "\\" . __CLASS__, "onTaskUpdateEvent"); RegisterModuleDependences("tasks", "OnTaskElapsedTimeAdd", "intranet", "\\" . __CLASS__, "onTaskElapsedTimeAddEvent"); RegisterModuleDependences("tasks", "OnAfterCommentAdd", "intranet", "\\" . __CLASS__, "onAfterCommentAddEvent"); }
function InstallDB($arParams = array()) { RegisterModule("compression"); RegisterModuleDependences("main", "OnPageStart", "compression", "CCompress", "OnPageStart", 1); RegisterModuleDependences("main", "OnAfterEpilog", "compression", "CCompress", "OnAfterEpilog", 10000); return true; }
function DoInstall() { RegisterModule("intelma.telegramma"); RegisterModuleDependences("main", "OnBeforeProlog", "intelma.telegramma", "Itelegramma", "MyOnBeforePrologHandler"); RegisterModuleDependences("iblock", "OnAfterIBlockElementAdd", "intelma.telegramma", "Itelegramma", "MyOnAfterIBlockElementAddHandler"); RegisterModuleDependences("iblock", "OnAfterIBlockElementDelete", "intelma.telegramma", "Itelegramma", "MyOnAfterIBlockElementDeleteHandler"); }
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; }
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 InstallDB($arParams = array()) { RegisterModuleDependences('main', 'OnPageStart', self::MODULE_ID, 'WS\Migrations\Module', 'listen'); RegisterModuleDependences('main', 'OnAfterEpilog', self::MODULE_ID, 'WS\Migrations\Module', 'commitDutyChanges'); global $DB; $DB->RunSQLBatch(Application::getDocumentRoot().'/'.Application::getPersonalRoot() . "/modules/".$this->MODULE_ID."/install/db/install.sql"); return true; }
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_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($arParams = array()) { RegisterModuleDependences('main', 'OnPanelCreate', self::MODULE_ID, '\Hotpin\Lang\Handler', 'addPanelButton'); 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); }
/** * 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 $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, $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() { RegisterModule("mobile"); RegisterModuleDependences("pull", "OnGetDependentModule", "mobile", "CMobileEvent", "PullOnGetDependentModule"); RegisterModuleDependences("main", "OnApplicationsBuildList", "main", 'MobileApplication', "OnApplicationsBuildList", 100, "modules/mobile/classes/general/mobile_event.php"); 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 InstallEvents($arParams = array()) { RegisterModuleDependences('main', 'OnBuildGlobalMenu', self::MODULE_ID, 'Cbxd', 'OnBuildGlobalMenu'); RegisterModuleDependences('main', 'OnBeforeProlog', self::MODULE_ID, 'Cbxd', 'OnBeforeProlog'); RegisterModuleDependences('main', 'OnProlog', self::MODULE_ID, 'Cbxd', 'OnProlog'); return true; }
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() { RegisterModule($this->MODULE_ID); // региструем код, который будет выполняться OnProlog RegisterModuleDependences("main", "OnProlog", $this->MODULE_ID, "TestModuleOnPageLoad", "testModuleMainHandler"); 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 InstallEvents() { RegisterModule("refreshlab.err404"); RegisterModuleDependences("main", "OnEpilog", "refreshlab.err404", "CErr404", "handler404", 10000); 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; $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 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; } }
public function InstallDB() { global $APPLICATION, $DB, $DBType, $errors; RegisterModuleDependences('sale', 'OnSaleComponentOrderOneStepProcess', $this->MODULE_ID, 'CDadataSuggestions', 'OnSaleComponentOrderOneStepProcess'); RegisterModule($this->MODULE_ID); return true; }
function InstallDB($install_wizard = true) { global $DB, $DBType, $APPLICATION; RegisterModule("bitrix.eshop"); RegisterModuleDependences("main", "OnBeforeProlog", "bitrix.eshop", "CEShop", "ShowPanel"); return true; }
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 InstallDB($arParams = array()) { global $DB, $DBType, $APPLICATION; $this->errors = false; // Database tables creation if (!$DB->Query("SELECT 'x' FROM b_sender_contact WHERE 1=0", true)) { $this->errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/sender/install/db/" . $DBType . "/install.sql"); } if ($this->errors !== false) { $APPLICATION->ThrowException(implode("<br>", $this->errors)); return false; } else { RegisterModule("sender"); CModule::IncludeModule("sender"); // read and click notifications RegisterModuleDependences("main", "OnMailEventMailRead", "sender", "bitrix\\sender\\postingmanager", "onMailEventMailRead"); RegisterModuleDependences("main", "OnMailEventMailClick", "sender", "bitrix\\sender\\postingmanager", "onMailEventMailClick"); // unsubscription notifications RegisterModuleDependences("main", "OnMailEventSubscriptionDisable", "sender", "Bitrix\\Sender\\Subscription", "onMailEventSubscriptionDisable"); RegisterModuleDependences("main", "OnMailEventSubscriptionEnable", "sender", "Bitrix\\Sender\\Subscription", "onMailEventSubscriptionEnable"); RegisterModuleDependences("main", "OnMailEventSubscriptionList", "sender", "Bitrix\\Sender\\Subscription", "onMailEventSubscriptionList"); // connectors of module sender RegisterModuleDependences("sender", "OnConnectorList", "sender", "bitrix\\sender\\connectormanager", "onConnectorListContact"); RegisterModuleDependences("sender", "OnConnectorList", "sender", "bitrix\\sender\\connectormanager", "onConnectorListRecipient"); // mail templates and blocks RegisterModuleDependences("sender", "OnPresetTemplateList", "sender", "Bitrix\\Sender\\Preset\\TemplateBase", "onPresetTemplateList"); RegisterModuleDependences("sender", "OnPresetTemplateList", "sender", "Bitrix\\Sender\\TemplateTable", "onPresetTemplateList"); RegisterModuleDependences("sender", "OnPresetMailBlockList", "sender", "Bitrix\\Sender\\Preset\\MailBlockBase", "OnPresetMailBlockList"); CTimeZone::Disable(); \Bitrix\Sender\MailingManager::actualizeAgent(); CAgent::AddAgent(\Bitrix\Sender\MailingManager::getAgentNamePeriod(), "sender", "N", COption::GetOptionString("sender", "reiterate_interval")); CTimeZone::Enable(); return true; } }
function InstallDB($arParams = array()) { RegisterModuleDependences('main', 'OnBuildGlobalMenu', self::MODULE_ID, 'CIpdesignK', 'OnBuildGlobalMenu'); $arsites = array(); $rsSites = CSite::GetList($by="sort", $order="desc", false); while ($arSite = $rsSites->Fetch()){ $arsites[] = $arSite['ID']; } $arFilter = array( "TYPE_ID" => "SENDWISHLIST", ); $rsET = CEventType::GetList($arFilter); $arET = $rsET->Fetch(); if(empty($arET)){ $et = new CEventType; $arMessageFields = array("USER_ID" => $UserProduct['USER']['ID'], "USER_NAME" => $UserProduct['USER']["NAME"].' '.$UserProduct['USER']["LAST_NAME"], "USER_EMAIL" => $UserProduct['USER']["EMAIL"], "PRODUCTS_LIST" => $strListProduct); $DESCRIPTION = '#USER_ID# - '.GetMessage("IT_BASKET_SENDER_USER_ID"); $DESCRIPTION .= '\n#USER_NAME# - '.GetMessage("IT_BASKET_SENDER_USER_NAME"); $DESCRIPTION .= '\n#USER_EMAIL# - '.GetMessage("IT_BASKET_SENDER_USER_EMAIL"); $DESCRIPTION .= '\n#PRODUCTS_LIST# - '.GetMessage("IT_BASKET_SENDER_PRODUCTS_LIST"); $sendType = $et->Add(array( "LID" => 'ru', "EVENT_NAME" => "SENDWISHLIST", "NAME" => GetMessage("IT_SENDER_TYPE_NAME"), "DESCRIPTION" => $DESCRIPTION )); }else{ $sendType = $arET['ID']; } $rsMess = CEventMessage::GetList($by="site_id", $order="desc", array('TYPE' => 'SENDWISHLIST')); $arMess = $rsMess->Fetch(); if(empty($arMess)){ $message = ''; $message .= '<h2>'.GetMessage("IT_BASKET_SENDER_TEMPLATE_HELLO").',#USER_NAME#</h2>'; $message .= '<p>'.GetMessage("IT_BASKET_SENDER_TEMPLATE_WHISHLIST").'</p>'; $message .= '<hr />'; $message .= '#PRODUCTS_LIST#'; $arFields = array("ACTIVE" => 'Y', "EVENT_NAME" => "SENDWISHLIST", "LID" => $arsites, "EMAIL_FROM" => "#DEFAULT_EMAIL_FROM#", "EMAIL_TO" => "#USER_EMAIL#", "BCC" => "", "MESSAGE" => $message, "BODY_TYPE" => "html", "SUBJECT" => GetMessage("IT_SENDER_MESSAGE_SUBJECT"). " #SERVER_NAME# ", ); $emess = new CEventMessage; if($emess->Add($arFields)){ } }; RegisterModuleDependences("sale", "OnCondSaleActionsControlBuildList", self::MODULE_ID, "CSaleActionCtrlBasketMain", "GetControlDescr"); RegisterModuleDependences("main", "OnBeforeProlog", "main", "", "", 110, '/modules/ipdesign.k1785/itdiscount.php'); return true; }