本文整理汇总了PHP中CBXFeatures::SetFeatureEnabled方法的典型用法代码示例。如果您正苦于以下问题:PHP CBXFeatures::SetFeatureEnabled方法的具体用法?PHP CBXFeatures::SetFeatureEnabled怎么用?PHP CBXFeatures::SetFeatureEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBXFeatures
的用法示例。
在下文中一共展示了CBXFeatures::SetFeatureEnabled方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DoUninstall
function DoUninstall()
{
global $DB, $APPLICATION, $step;
$step = IntVal($step);
if($step<2)
$APPLICATION->IncludeAdminFile(GetMessage("SUP_UNINSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/support/install/unstep1.php");
elseif($step==2)
{
$APPLICATION->ResetException();
if ($this->UnInstallDB(array('admin' => 'Y', 'savedata' => $_REQUEST['savedata'])))
{
$this->UnInstallFiles();
}
CBXFeatures::SetFeatureEnabled("Support", false);
$APPLICATION->IncludeAdminFile(GetMessage("SUP_UNINSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/support/install/unstep2.php");
}
}
示例2: DoUninstall
function DoUninstall()
{
global $APPLICATION, $step;
$this->errors = null;
$step = IntVal($step);
if ($step < 2) {
$APPLICATION->IncludeAdminFile(GetMessage("DAV_INSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/dav/install/unstep1.php");
} elseif ($step == 2) {
$this->UnInstallDB(array("savedata" => $_REQUEST["savedata"]));
$this->UnInstallFiles();
$this->UnInstallEvents();
CBXFeatures::SetFeatureEnabled("DAV", false);
$GLOBALS["errors"] = $this->errors;
$APPLICATION->IncludeAdminFile(GetMessage("DAV_INSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/dav/install/unstep2.php");
}
}
示例3: DoUninstall
function DoUninstall()
{
global $APPLICATION, $DB;
if (CModule::IncludeModule('socialnetwork')) {
require_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/wiki/include.php';
CWikiSocnet::EnableSocnet(false);
}
$this->UnInstallFiles();
$this->UnInstallDB();
CBXFeatures::SetFeatureEnabled('Wiki', false);
$APPLICATION->IncludeAdminFile(GetMessage('WIKI_UNINSTALL_TITLE'), $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/wiki/install/unstep.php');
}
示例4: array
}
elseif($bTasksEnabledForAnySite && CBXFeatures::IsFeatureEditable("Tasks"))
{
if (!CBXFeatures::IsFeatureEnabled("Tasks"))
CBXFeatures::SetFeatureEnabled("Tasks", true, false);
}
if ($bCalendarDisabledForAllSites)
{
if (CBXFeatures::IsFeatureEnabled("Calendar"))
CBXFeatures::SetFeatureEnabled("Calendar", false, false);
}
elseif($bCalendarEnabledForAnySite && CBXFeatures::IsFeatureEditable("Calendar"))
{
if (!CBXFeatures::IsFeatureEnabled("Calendar"))
CBXFeatures::SetFeatureEnabled("Calendar", true, false);
}
}
if (strlen($strWarning) > 0)
CAdminMessage::ShowMessage($strWarning);
$aTabs = array(
array("DIV" => "edit1", "TAB" => GetMessage("SONET_TAB_SET"), "ICON" => "socialnetwork_settings", "TITLE" => GetMessage("SONET_TAB_SET_ALT")),
array("DIV" => "edit2", "TAB" => GetMessage("SONET_TAB_RIGHTS"), "ICON" => "socialnetwork_settings", "TITLE" => GetMessage("SONET_TAB_RIGHTS_ALT")),
);
$tabControl = new CAdminTabControl("tabControl", $aTabs);
$aSubTabs = array();
foreach ($arFeatures as $key => $value)
{
示例5: DoUninstall
function DoUninstall()
{
global $APPLICATION, $step;
$STAT_RIGHT = $APPLICATION->GetGroupRight("statistic");
if ($STAT_RIGHT >= "W") {
$step = IntVal($step);
if ($step < 2) {
$APPLICATION->IncludeAdminFile(GetMessage("STAT_UNINSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/statistic/install/unstep1.php");
} elseif ($step == 2) {
$this->UnInstallDB(array("savedata" => $_REQUEST["savedata"]));
//message types and templates
if ($_REQUEST["save_templates"] != "Y") {
$this->UnInstallEvents();
}
$this->UnInstallFiles();
CBXFeatures::SetFeatureEnabled("Analytics", false);
$GLOBALS["errors"] = $this->errors;
$APPLICATION->IncludeAdminFile(GetMessage("STAT_UNINSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/statistic/install/unstep2.php");
}
}
}
示例6: DoUninstall
function DoUninstall()
{
global $APPLICATION, $step;
$step = IntVal($step);
if ($step < 2) {
$APPLICATION->IncludeAdminFile(GetMessage("BIZPROC_INSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/bizprocdesigner/install/unstep1.php");
} elseif ($step == 2) {
$this->UnInstallFiles();
$this->UnInstallDB(false);
CBXFeatures::SetFeatureEnabled("BizProc", false);
$GLOBALS["errors"] = $this->errors;
$APPLICATION->IncludeAdminFile(GetMessage("BIZPROC_INSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/bizprocdesigner/install/unstep2.php");
}
}
示例7: DoUninstall
function DoUninstall()
{
global $DB, $APPLICATION, $USER, $step;
if($USER->IsAdmin())
{
$step = IntVal($step);
if($step < 2)
{
$APPLICATION->IncludeAdminFile(GetMessage("LISTS_UNINSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/lists/install/unstep1.php");
}
elseif($step == 2)
{
$this->UnInstallDB(array(
"savedata" => $_REQUEST["savedata"],
));
$this->UnInstallFiles();
CBXFeatures::SetFeatureEnabled("Lists", false);
$GLOBALS["errors"] = $this->errors;
$APPLICATION->IncludeAdminFile(GetMessage("LISTS_UNINSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/lists/install/unstep2.php");
}
}
}
示例8: DoUninstall
function DoUninstall()
{
global $DB, $APPLICATION, $step;
$RIGHT = $APPLICATION->GetGroupRight("controller");
if ($RIGHT >= "W") {
$step = IntVal($step);
if ($step < 2) {
$APPLICATION->IncludeAdminFile(GetMessage("CTRL_INST_STEP1_UN"), $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/controller/install/unstep1.php");
} elseif ($step == 2) {
$this->UnInstallDB(array("savedata" => $_REQUEST["savedata"]));
//message types and templates
if ($_REQUEST["save_templates"] != "Y") {
$this->UnInstallEvents();
}
$this->UnInstallFiles();
CBXFeatures::SetFeatureEnabled("Controller", false);
$GLOBALS["errors"] = $this->errors;
$APPLICATION->IncludeAdminFile(GetMessage("CTRL_INST_STEP1_UN"), $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/controller/install/unstep.php");
}
}
}
示例9: DoUninstall
function DoUninstall()
{
global $DB, $DOCUMENT_ROOT, $APPLICATION, $step;
$step = IntVal($step);
if ($step < 2) {
$APPLICATION->IncludeAdminFile(GetMessage('CRM_UNINSTALL_TITLE'), $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/crm/install/unstep1.php');
} elseif ($step == 2) {
$this->UnInstallDB(array('savedata' => $_REQUEST['savedata']));
$this->UnInstallFiles();
CBXFeatures::SetFeatureEnabled('crm', false);
$GLOBALS['errors'] = $this->errors;
$APPLICATION->IncludeAdminFile(GetMessage('CRM_UNINSTALL_TITLE'), $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/crm/install/unstep2.php');
}
}
示例10: OnPostForm
function OnPostForm()
{
$wizard =& $this->GetWizard();
$serviceID = $wizard->GetVar("nextStep");
$serviceStage = $wizard->GetVar("nextStepStage");
if ($serviceID == "finish") {
$wizard->SetCurrentStep("finish");
return;
}
$defSiteName = GetMessage("MAIN_DEFAULT_SITE_NAME");
$wizard->GetVar("siteName");
if ($wizard->GetVar("siteName") != "") {
$defSiteName = $wizard->GetVar("siteName");
}
$res = false;
$site_id = $wizard->GetVar("siteID");
if ($site_id != "") {
$db_res = CSite::GetList($by = "sort", $order = "desc", array("LID" => $site_id));
if ($db_res) {
$res = $db_res->Fetch();
}
}
if ($res) {
$obSite = new CSite();
$result = $obSite->Update($site_id, array("NAME" => $defSiteName, "SITE_NAME" => $defSiteName));
} elseif ($res && $res["NAME"] == GetMessage("MAIN_DEFAULT_SITE_NAME")) {
$SiteNAME = $defSiteName . " (" . GetMessage("MAIN_DEFAULT_SITE_NAME") . ")";
$obSite = new CSite();
$result = $obSite->Update($site_id, array("NAME" => $SiteNAME, "SITE_NAME" => $defSiteName));
}
$arServices = WizardServices::GetServices($_SERVER["DOCUMENT_ROOT"] . $wizard->GetPath(), "/site/services/");
if ($_SERVER["PHP_SELF"] == "/index.php" && !NON_INTRANET_EDITION) {
$arEditions = array("Portal");
if (EDITION == "E" || EDITION == "C" || EDITION == "H") {
$arEditions[] = "Communications";
}
if (EDITION == "E" || EDITION == "H") {
$arEditions[] = "Enterprise";
}
if (EDITION == "H") {
$arEditions[] = "Holding";
}
CBXFeatures::InitiateEditionsSettings($arEditions);
if ($wizard->GetVar("allowSocial") != "Y") {
$ar = array("Friends", "PersonalPhoto", "PersonalForum", "Blog", "Forum", "Gallery");
foreach ($ar as $f) {
CBXFeatures::SetFeatureEnabled($f, false);
}
}
CBXFeatures::SetFeatureEnabled("Analytics", false);
}
//define("WIZARD_IS_RERUN", $_SERVER["PHP_SELF"] != "/index.php");
if ($_SERVER["PHP_SELF"] != "/index.php") {
unset($arServices["users"]);
unset($arServices["iblock_demo_data"]);
unset($arServices["medialibrary"]);
if ($wizard->GetVar("installDemoData") != "Y") {
$s = array();
foreach ($arServices["main"]["STAGES"] as $v) {
if (!in_array($v, array("property.php", "options.php"))) {
$s[] = $v;
}
}
$arServices["main"]["STAGES"] = $s;
//unset($arServices["forum"]);
//unset($arServices["search"]);
//unset($arServices["files"]);
//unset($arServices["iblock"]);
//unset($arServices["advertising"]);
//unset($arServices["vote"]);
//unset($arServices["learning"]);
//unset($arServices["form"]);
//unset($arServices["subscribe"]);
//unset($arServices["blog"]);
//unset($arServices["socialnetwork"]);
//unset($arServices["intranet"]);
//unset($arServices["support"]);
//unset($arServices["workflow"]);
//unset($arServices["fileman"]);
//unset($arServices["statistic"]);
}
}
if ($serviceStage == "skip") {
$success = true;
} else {
$success = $this->InstallService($serviceID, $serviceStage);
}
list($nextService, $nextServiceStage, $stepsComplete, $status) = $this->GetNextStep($arServices, $serviceID, $serviceStage);
if ($nextService == "finish") {
if (LANGUAGE_ID != "ru") {
CBXFeatures::SetFeatureEnabled("Salary", false);
}
$formName = $wizard->GetFormName();
$response = "window.ajaxForm.StopAjax(); window.ajaxForm.SetStatus('100'); window.ajaxForm.Post('" . $nextService . "', '" . $nextServiceStage . "','" . $status . "');";
} else {
$arServiceID = array_keys($arServices);
$lastService = array_pop($arServiceID);
$stepsCount = $arServices[$lastService]["POSITION"];
if (array_key_exists("STAGES", $arServices[$lastService]) && is_array($arServices[$lastService])) {
$stepsCount += count($arServices[$lastService]["STAGES"]) - 1;
//.........这里部分代码省略.........