コード例 #1
0
ファイル: index.php プロジェクト: ASDAFF/bitrix_export_vk
	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");
	}
コード例 #2
0
ファイル: index.php プロジェクト: k-kalashnikov/geekcon_new
 function InstallDB($install_wizard = true)
 {
     global $DB, $DBType, $APPLICATION;
     RegisterModule("bitrix.eshop");
     RegisterModuleDependences("main", "OnBeforeProlog", "bitrix.eshop", "CEShop", "ShowPanel");
     return true;
 }
コード例 #3
0
 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");
 }
コード例 #4
0
ファイル: index.php プロジェクト: k-kalashnikov/geekcon_new
 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;
 }
コード例 #5
0
ファイル: index.php プロジェクト: spas-viktor/books
 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;
     }
 }
コード例 #6
0
ファイル: index.php プロジェクト: safindr/snippets
 function DoInstall()
 {
     global $DOCUMENT_ROOT, $APPLICATION;
     $this->InstallFiles();
     RegisterModule("safin");
     $APPLICATION->IncludeAdminFile(GetMessage('install_module'), $DOCUMENT_ROOT . "/bitrix/modules/safin/install/step.php");
 }
コード例 #7
0
ファイル: index.php プロジェクト: k-kalashnikov/geekcon_new
 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;
     }
 }
コード例 #8
0
ファイル: index.php プロジェクト: Satariall/izurit
 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;
 }
コード例 #9
0
ファイル: index.php プロジェクト: Vasek18/bitrix-testmodule
 function InstallDB()
 {
     RegisterModule($this->MODULE_ID);
     // региструем код, который будет выполняться OnProlog
     RegisterModuleDependences("main", "OnProlog", $this->MODULE_ID, "TestModuleOnPageLoad", "testModuleMainHandler");
     return true;
 }
コード例 #10
0
 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);
 }
コード例 #11
0
ファイル: index.php プロジェクト: nProfessor/Mytb
	function InstallEvents()
	{
		RegisterModule("refreshlab.err404");
		RegisterModuleDependences("main", "OnEpilog", "refreshlab.err404", "CErr404", "handler404", 10000);

		return true;
	}
コード例 #12
0
ファイル: index.php プロジェクト: k-kalashnikov/geekcon_new
 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;
     }
 }
コード例 #13
0
ファイル: index.php プロジェクト: sanikeev/citimall-test
 function DoInstall()
 {
     global $DOCUMENT_ROOT, $APPLICATION;
     $this->InstallDb();
     RegisterModule("sanikeev");
     $APPLICATION->IncludeAdminFile("Установка модуля sanikeev_module", $DOCUMENT_ROOT . "/local/modules/sanikeev/install/step.php");
 }
コード例 #14
0
 function DoInstall()
 {
     global $DOCUMENT_ROOT, $APPLICATION;
     $this->InstallFiles();
     RegisterModule("slyblocksmodule");
     $APPLICATION->IncludeAdminFile("”становка модул¤ »нтерактивные блоки", $DOCUMENT_ROOT."/bitrix/modules/slyblocksmodule/install/step.php");
 }
コード例 #15
0
ファイル: index.php プロジェクト: ASDAFF/suggestions-bitrix
 public function InstallDB()
 {
     global $APPLICATION, $DB, $DBType, $errors;
     RegisterModuleDependences('sale', 'OnSaleComponentOrderOneStepProcess', $this->MODULE_ID, 'CDadataSuggestions', 'OnSaleComponentOrderOneStepProcess');
     RegisterModule($this->MODULE_ID);
     return true;
 }
コード例 #16
0
ファイル: index.php プロジェクト: ASDAFF/bitrix-pbrf
	function DoInstall(){
		global $DOCUMENT_ROOT, $APPLICATION;
		$this->InstallFiles();
		$this->InstallDB();
		RegisterModule("pbrf");
		$APPLICATION->IncludeAdminFile("Установка модуля pbrf", $DOCUMENT_ROOT."/bitrix/modules/pbrf/install/step.php");
	}
コード例 #17
0
ファイル: index.php プロジェクト: Hawkart/megatv
 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)));
     }
 }
コード例 #18
0
ファイル: index.php プロジェクト: akniyev/itprom_dobrohost
 function DoInstall()
 {
     global $APPLICATION;
     $this->InstallDB();
     $this->InstallFiles();
     RegisterModule(self::MODULE_ID);
 }
コード例 #19
0
 /**
  * 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');
 }
コード例 #20
0
ファイル: index.php プロジェクト: Satariall/izurit
 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;
     }
 }
コード例 #21
0
        function InstallDB()
        {
                global $DB, $DBType, $APPLICATION;
                $this->errors = false;

                RegisterModule(self::MODULE_ID);
        }
コード例 #22
0
ファイル: index.php プロジェクト: ASDAFF/1C_Bitrix_info_site
 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;
 }
コード例 #23
0
ファイル: index.php プロジェクト: ASDAFF/bit.includer
 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");
         }
     }
 }
コード例 #24
0
ファイル: index.php プロジェクト: mrdeadmouse/u136006
 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;
 }
コード例 #25
0
ファイル: index.php プロジェクト: Satariall/izurit
 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;
     }
 }
コード例 #26
0
ファイル: index.php プロジェクト: k-kalashnikov/geekcon_new
 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;
 }
コード例 #27
0
ファイル: index.php プロジェクト: k-kalashnikov/geekcon_new
 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;
 }
コード例 #28
0
ファイル: index.php プロジェクト: Satariall/izurit
 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;
 }
コード例 #29
0
 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;
     }
 }
コード例 #30
0
ファイル: index.php プロジェクト: ASDAFF/bitrix_marketing
	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");
	}