Beispiel #1
0
	public function DoUninstall() {
		global $DB, $DBType;

		COption::RemoveOption($this->MODULE_ID);
		UnRegisterModule($this->MODULE_ID);
		DeleteDirFiles(
			$_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/bx_ichannels/install/admin', 
			$_SERVER['DOCUMENT_ROOT'] . '/bitrix/admin'
		);
		DeleteDirFiles(
			$_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/bx_ichannels/install/js', 
			$_SERVER['DOCUMENT_ROOT'] . '/bitrix/js/bx_ichannels'
		);

		UnRegisterModuleDependences(
			'bx_ichannels', 
			'getImporters', 
			'bx_ichannels', 
			'CIChannelsRss', 
			'getImporter'
		);

		UnRegisterModuleDependences(
			'bx_ichannels',
			'getRssMappers',
			'bx_ichannels',
			'CIChannelsRssMapperByLink',
			'getRssMapper'
		);

		$this->errors = $DB->RunSQLBatch($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/bx_ichannels/install/db/' . $DBType . '/uninstall.sql');
	}
function OnModuleInstalledEvent($id, $installed, $Module)
{
    foreach (GetModuleEvents("main", "OnModuleInstalled", true) as $arEvent) {
        ExecuteModuleEventEx($arEvent, array($id, $installed));
    }
    $cModules = COption::GetOptionString("main", "mp_modules_date", "");
    $arModules = array();
    if (strlen($cModules) > 0) {
        $arModules = unserialize($cModules);
    }
    if ($installed == "Y") {
        $arModules[] = array("ID" => $id, "NAME" => htmlspecialcharsbx($Module->MODULE_NAME), "TMS" => time());
        if (count($arModules) > 3) {
            $arModules = array_slice($arModules, -3);
        }
        COption::SetOptionString("main", "mp_modules_date", serialize($arModules));
    } else {
        foreach ($arModules as $arid => $val) {
            if ($val["ID"] == $id) {
                unset($arModules[$arid]);
            }
        }
        if (count($arModules) > 0) {
            COption::SetOptionString("main", "mp_modules_date", serialize($arModules));
        } else {
            COption::RemoveOption("main", "mp_modules_date");
        }
        $_SESSION["MP_MOD_DELETED"] = array("ID" => $id, "NAME" => $Module->MODULE_NAME);
    }
}
 /**
  * Удалить модуль из БД, удаление таблиц модуля
  *
  * @param array $arParams
  * @return bool
  */
 public function UnInstallDB($arParams = array())
 {
     // если у модуля есть свои таблицы, сюда следует поместить удаление этих таблиц
     COption::RemoveOption($this->MODULE_ID);
     \Bitrix\Main\ModuleManager::unRegisterModule($this->MODULE_ID);
     return true;
 }
Beispiel #4
0
	public function UnInstallFiles()
	{
		DeleteDirFilesEx("/bitrix/components/pr/pwd");
		COption::RemoveOption($this->MODULE_ID);
		
		return true;
	}
Beispiel #5
0
 public function DoUninstall()
 {
     COption::RemoveOption('imageimport');
     DeleteDirFiles($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/imageimport/install/admin', $_SERVER['DOCUMENT_ROOT'] . '/bitrix/admin');
     UnRegisterModule('imageimport');
     return true;
 }
Beispiel #6
0
 function UnInstallDB($arParams = array())
 {
     global $DB, $APPLICATION;
     $errors = false;
     if (array_key_exists("savedata", $arParams) && $arParams["savedata"] != "Y") {
         $errors = $DB->RunSQLBatch($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/support/install/db/' . strtolower($DB->type) . '/uninstall.sql');
         if (!is_array($errors)) {
             @set_time_limit(600);
             COption::RemoveOption('support');
             $db_res = $DB->Query("SELECT ID FROM b_file WHERE MODULE_ID = 'support'");
             while ($arRes = $db_res->Fetch()) {
                 CFile::Delete($arRes['ID']);
             }
             if ($arParams['admin'] == 'Y') {
                 $this->UnInstallEvents();
             }
         }
     }
     if (is_array($errors)) {
         $APPLICATION->ThrowException(implode(' ', $errors));
         return false;
     }
     CAgent::RemoveModuleAgents('support');
     UnRegisterModuleDependences('mail', 'OnGetFilterList', 'support', 'CSupportEMail', 'OnGetFilterList');
     UnRegisterModule('support');
     return true;
 }
Beispiel #7
0
 function UnInstallDB()
 {
     COption::RemoveOption("translate");
     UnRegisterModuleDependences('main', 'OnPanelCreate', 'translate');
     UnRegisterModule("translate");
     return true;
 }
Beispiel #8
0
 public function DoUninstall()
 {
     global $APPLICATION;
     COption::RemoveOption($this->MODULE_ID);
     UnRegisterModule($this->MODULE_ID);
     $this->UnInstallFiles();
 }
 function GetConfig($siteId = false)
 {
     $shopLocationId = CSaleHelper::getShopLocationId($siteId);
     $arShopLocation = CSaleHelper::getLocationByIdHitCached($shopLocationId);
     if (!$arShopLocation) {
         $arShopLocation = array();
     }
     $shopPrevLocationId = COption::GetOptionString('sale', 'delivery_rus_post_first_prev_loc', 0);
     /* if shop's location was changed */
     if ($shopPrevLocationId != $shopLocationId) {
         COption::SetOptionString('sale', 'delivery_rus_post_first_prev_loc', $shopLocationId);
         COption::RemoveOption('sale', 'delivery_rus_post_first_tarifs');
     }
     $arConfig = array('CONFIG_GROUPS' => array('wrapper' => GetMessage('SALE_DH_RPF_WRP_TITLE')));
     $aviableBoxes = self::getAviableBoxes();
     foreach ($aviableBoxes as $boxId => $arBox) {
         CSaleDeliveryHelper::makeBoxConfig($boxId, $arBox, 'wrapper', $arConfig);
     }
     $arConfig['CONFIG']['tarif_section_1'] = array('TYPE' => 'SECTION', 'TITLE' => GetMessage('SALE_DH_RPF_TARIFS'), 'GROUP' => 'wrapper');
     $arTarifs = CSaleHelper::getOptionOrImportValues('delivery_rus_post_first_tarifs', array('CDeliveryRusPostFirst', 'getTarifsByRegionFromCsv'), array($arShopLocation));
     foreach (self::$TARIFS as $arTarif) {
         $tarifId = $arTarif[self::$TARIF_IDX];
         $arConfig['CONFIG']['TARIF_' . $tarifId] = array('TYPE' => 'STRING', 'DEFAULT' => isset($arTarifs[$tarifId]) ? $arTarifs[$tarifId] : '0', 'TITLE' => $arTarif[self::$TARIF_DESCR], 'GROUP' => 'wrapper');
     }
     /* Additional services */
     foreach (self::$SERVICES as $serviceId => $arService) {
         $tarifId = $arService[self::$TARIF_IDX];
         $arConfig['CONFIG']['service_' . $tarifId . '_section'] = array('TYPE' => 'SECTION', 'TITLE' => $arService[self::$TARIF_DESCR], 'GROUP' => 'wrapper');
         $arConfig['CONFIG']['service_' . $tarifId . '_enabled'] = array('TYPE' => 'CHECKBOX', 'TITLE' => GetMessage('SALE_DH_RPF_SRV_ALLOW'), 'GROUP' => 'wrapper', 'DEFAULT' => $serviceId == 'NOTIFICATION_REG' ? 'N' : 'Y', 'HIDE_BY_NAMES' => array('service_' . $tarifId . '_value'));
         $arConfig['CONFIG']['service_' . $tarifId . '_value'] = array('TYPE' => 'STRING', 'TITLE' => GetMessage('SALE_DH_RPF_SRV_PRICE'), 'GROUP' => 'wrapper', 'DEFAULT' => isset($arTarifs[$tarifId]) ? $arTarifs[$tarifId] : '0');
     }
     return $arConfig;
 }
Beispiel #10
0
 function UnInstallDB($arParams = array())
 {
     global $DB, $DBType, $APPLICATION;
     $this->errors = false;
     UnRegisterModule("rficb.payment");
     COption::RemoveOption("rficb.payment", "");
     return true;
 }
Beispiel #11
0
	function UnInstallEvents()
	{
		COption::RemoveOption("refreshlab.err404");
		UnRegisterModuleDependences("main", "OnEpilog", "refreshlab.err404", "CErr404", "handler404");
		UnRegisterModule("refreshlab.err404");
  
		return true;
	}
Beispiel #12
0
	function UnInstallDB($arParams = Array())
	{
		global $DB, $DBType, $APPLICATION;

		COption::RemoveOption($this->MODULE_ID, "message");
		UnRegisterModule($this->MODULE_ID);

		return true;
	}
Beispiel #13
0
 public function DoUninstall()
 {
     COption::RemoveOption('bx_moddev');
     DeleteDirFiles($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/bx_moddev/install/admin', $_SERVER['DOCUMENT_ROOT'] . '/bitrix/admin');
     // DeleteDirFiles($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/bx_moddev/install/components', $_SERVER['DOCUMENT_ROOT'] . '/bitrix/components');
     DeleteDirFilesEx("/bitrix/js/bx_moddev");
     UnRegisterModule('bx_moddev');
     return true;
 }
Beispiel #14
0
 public static function enableSignature($enable)
 {
     $enable = (bool) $enable;
     if ($enable) {
         \COption::RemoveOption('crm', 'enable_b24_email_sign');
     } else {
         \COption::SetOptionString('crm', 'enable_b24_email_sign', 'N');
     }
 }
Beispiel #15
0
 function DoUninstall()
 {
     global $DOCUMENT_ROOT, $APPLICATION;
     COption::RemoveOption($this->MODULE_ID, 'null');
     $this->UnInstallFiles();
     $this->UnInstallEvents();
     UnRegisterModule($this->MODULE_ID);
     $APPLICATION->IncludeAdminFile(GetMessage('CODECRAFT_NULL_UNINSTALL_TITLE', array('#MODULE#', $this->MODULE_NAME)), $DOCUMENT_ROOT . BX_ROOT . "/modules/" . $this->MODULE_ID . "/install/unstep.php");
 }
Beispiel #16
0
 function DoUninstall()
 {
     global $APPLICATION;
     UnRegisterModule("grain.customsettings");
     $this->UnInstallFiles();
     $GLOBALS["errors"] = $this->errors;
     COption::RemoveOption("grain.customsettings");
     $APPLICATION->IncludeAdminFile(GetMessage("GCUSTOMSETTINGS_INSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/grain.customsettings/install/unstep2.php");
 }
Beispiel #17
0
 function UnInstallDB()
 {
     COption::RemoveOption('wiki');
     UnRegisterModule('wiki');
     UnRegisterModuleDependences('main', 'OnAddRatingVote', 'wiki', 'CRatingsComponentsWiki', 'OnAddRatingVote');
     UnRegisterModuleDependences('main', 'OnCancelRatingVote', 'wiki', 'CRatingsComponentsWiki', 'OnCancelRatingVote');
     UnRegisterModuleDependences('search', 'BeforeIndex', 'wiki', 'CRatingsComponentsWiki', 'BeforeIndex');
     return true;
 }
	function UnInstallDB($arParams = array())
	{
		$this->UnInstallTasks();
		COption::RemoveOption("retailrocket");

		UnRegisterModule("retailrocket");

		return true;
	}
Beispiel #19
0
 public static function enableCloseDateSync($enable)
 {
     $enable = (bool) $enable;
     if ($enable) {
         \COption::RemoveOption('crm', 'enable_close_date_sync');
     } else {
         \COption::SetOptionString('crm', 'enable_close_date_sync', 'N');
     }
 }
Beispiel #20
0
 public function DoUninstall()
 {
     COption::RemoveOption($this->MODULE_ID);
     DeleteDirFiles($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/ibulkapi/install/admin', $_SERVER['DOCUMENT_ROOT'] . '/bitrix/admin');
     DeleteDirFilesEx("/bitrix/js/ibulkapi");
     UnRegisterModule($this->MODULE_ID);
     UnRegisterModuleDependences('ibulkapi', 'ActionsInfo', 'ibulkapi', 'IBulkAPIActionTest', 'GetInfo');
     UnRegisterModuleDependences('ibulkapi', 'TemplatesInfo', 'ibulkapi', 'IBulkAPITemplates', 'GetInfo');
     return true;
 }
Beispiel #21
0
 function UnInstallDB()
 {
     COption::RemoveOption('wiki');
     UnRegisterModule('wiki');
     UnRegisterModuleDependences('main', 'OnAddRatingVote', 'wiki', 'CRatingsComponentsWiki', 'OnAddRatingVote');
     UnRegisterModuleDependences('main', 'OnCancelRatingVote', 'wiki', 'CRatingsComponentsWiki', 'OnCancelRatingVote');
     UnRegisterModuleDependences('search', 'BeforeIndex', 'wiki', 'CRatingsComponentsWiki', 'BeforeIndex');
     UnRegisterModuleDependences('socialnetwork', 'BeforeIndexSocNet', 'wiki', 'CWikiSocNet', 'BeforeIndexSocNet');
     UnRegisterModuleDependences("im", "OnGetNotifySchema", "wiki", "CWikiNotifySchema", "OnGetNotifySchema");
     return true;
 }
Beispiel #22
0
	function UnInstallDB($arParams = Array())
	{
		global $DB, $DBType, $APPLICATION;

		COption::RemoveOption($this->MODULE_ID, "advert_code");
		COption::RemoveOption($this->MODULE_ID, "message_interval");
		COption::RemoveOption($this->MODULE_ID, "advert_forums");
		COption::RemoveOption($this->MODULE_ID, "status");	
		UnRegisterModule($this->MODULE_ID);

		return true;
	}
Beispiel #23
0
	public function UnInstallFiles()
	{
		DeleteDirFiles($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/'.$this->MODULE_ID.'/install/themes/.default/' , $_SERVER['DOCUMENT_ROOT'] . '/bitrix/themes/.default');
		DeleteDirFilesEx("/bitrix/themes/.default/icons/'.$this->MODULE_ID.'");
		DeleteDirFilesEx("/bitrix/js/'.$this->MODULE_ID.'");
		DeleteDirFilesEx("/bitrix/components/pr/recrm");
		DeleteDirFilesEx("/bitrix/components/pr/recrm.detail");
		DeleteDirFilesEx("/bitrix/components/pr/recrm.list");

		COption::RemoveOption($this->MODULE_ID);
		
		return true;
	}
 function GetSettings($strSettings)
 {
     $result = unserialize($strSettings);
     if (isset($result['RESET_TARIF_SETTINGS'])) {
         unset($result['RESET_TARIF_SETTINGS']);
     }
     if (isset($_REQUEST["RESET_TARIF_SETTINGS"]) && $_REQUEST["RESET_TARIF_SETTINGS"] == "Y" && !isset($_REQUEST["apply"])) {
         COption::RemoveOption('sale', 'delivery_rus_post_first_tarifs');
         foreach ($result as $key => $value) {
             if (substr($key, 0, 6) == 'TARIF_' || substr($key, 0, 8) == 'service_') {
                 unset($result[$key]);
             }
         }
     }
     return $result;
 }
 public static function setFormatID($formatID)
 {
     if (!is_int($formatID)) {
         throw new Main\ArgumentTypeException('formatID', 'integer');
     }
     if (!self::isDefined($formatID)) {
         return false;
     }
     self::$formatID = $formatID;
     self::$formatString = null;
     if ($formatID !== self::Dflt) {
         return \COption::SetOptionString('crm', 'prsn_nm_frmt_id', $formatID);
     }
     // Do not store default format ID
     \COption::RemoveOption('crm', 'prsn_nm_frmt_id');
     return true;
 }
Beispiel #26
0
 function DoUninstall()
 {
     global $APPLICATION, $step;
     $step = IntVal($step);
     if ($step < 2) {
         COption::RemoveOption($this->MODULE_ID);
         //CSalePaySystem::GetList(Array(), Array(), false, false, Array());
         $APPLICATION->IncludeAdminFile(GetMessage("ST_INSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/epages.pickpoint/install/unstep1.php");
     } elseif ($step == 2) {
         $this->UnInstallDB(array("savedata" => $_REQUEST["savedata"]));
         $this->UnInstallFiles();
         $this->RemoveInit();
         $GLOBALS["errors"] = $this->errors;
         UnRegisterModuleDependences('sale', 'OnOrderAdd', $this->MODULE_ID, 'CPickpoint', 'OnOrderAdd');
         UnRegisterModuleDependences('main', 'OnPageStart', $this->MODULE_ID, 'CPickpoint', 'CheckRequest');
         UnRegisterModuleDependences('sale', 'OnSaleComponentOrderOneStepDelivery', $this->MODULE_ID, 'CPickpoint', 'OnSCOrderOneStepDeliveryHandler');
         UnRegisterModule("epages.pickpoint");
         $APPLICATION->IncludeAdminFile(GetMessage("ST_INSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/epages.pickpoint/install/unstep2.php");
     }
     $GLOBALS["errors"] = $this->errors;
 }
Beispiel #27
0
 function UnInstallDB($arParams = array())
 {
     global $DB, $APPLICATION, $DBType;
     $errors = false;
     if ($arParams['savedata'] != "Y") {
         $errors = $DB->RunSQLBatch($_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/ldap/install/db/" . $DBType . "/uninstall.sql");
         if (!is_array($errors)) {
             COption::RemoveOption('ldap');
         }
     }
     if (!is_array($errors)) {
         UnRegisterModuleDependences("main", "OnUserLoginExternal", "ldap", "CLdap", "OnUserLogin");
         UnRegisterModuleDependences("main", "OnExternalAuthList", "ldap", "CLdap", "OnExternalAuthList");
         UnRegisterModuleDependences('main', 'OnBeforeProlog', 'ldap', 'CLDAP', 'NTLMAuth');
         UnRegisterModule("ldap");
     } else {
         $APPLICATION->ThrowException(implode("<br>", $errors));
         return false;
     }
     return true;
 }
Beispiel #28
0
	public function DoUninstall() {
		COption::RemoveOption($this->MODULE_ID);
		UnregisterModule($this->MODULE_ID);

		DeleteDirFiles(
			$_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/bx_eventimport/install/admin', 
			$_SERVER['DOCUMENT_ROOT'] . '/bitrix/admin'
		);

		DeleteDirFiles(
			$_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/bx_eventimport/install/js',
			$_SERVER['DOCUMENT_ROOT'] . '/bitrix/js/bx_eventimport'
		);

		UnRegisterModuleDependences(
			'bx_ichannels', 
			'getImporters', 
			'bx_eventimport', 
			'CEventImport', 
			'getImporter'
		);
	}
Beispiel #29
0
 /**
  * Удаление модуля
  */
 public function DoUninstall()
 {
     global $APPLICATION, $step;
     $this->STEP = $step ? (int) $step : $this->STEP;
     $stepMessage = '';
     switch ($this->STEP) {
         case 1:
             //удаление модуля
             $stepMessage = Loc::getMessage('UNSTEP_1');
             $APPLICATION->IncludeAdminFile($stepMessage, $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/bitrixunittests/install/unstep1.php');
             break;
         case 2:
             //удаление параметров модуля
             COption::RemoveOption($this->MODULE_ID, 'UNIT_TESTS_PATH');
             UnRegisterModule($this->MODULE_ID);
             //удаление файлов и таблиц
             $this->UnInstallFiles();
             $this->UnInstallDB();
             break;
     }
     return true;
 }
	function DoUninstall()
	{
		global $DOCUMENT_ROOT, $APPLICATION;
		
		COption::RemoveOption($this->MODULE_ID);
		
		$this->UnInstallFiles();
		$this->UnInstallDB();
		$this->UnInstallEvents();
		
		UnRegisterModule($this->MODULE_ID);
		$APPLICATION->IncludeAdminFile(GetMessage("CARROTQUEST_UNINSTALL_TITLE"), $DOCUMENT_ROOT."/bitrix/modules/".$this->MODULE_ID."/install/unstep.php");
		
	}