本文整理汇总了PHP中ModuleInstaller::handleBaseConfig方法的典型用法代码示例。如果您正苦于以下问题:PHP ModuleInstaller::handleBaseConfig方法的具体用法?PHP ModuleInstaller::handleBaseConfig怎么用?PHP ModuleInstaller::handleBaseConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModuleInstaller
的用法示例。
在下文中一共展示了ModuleInstaller::handleBaseConfig方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: preDisplay
/**
* This method checks to see if the configuration file exists and, if not, creates one by default
*
*/
public function preDisplay()
{
global $app_strings;
//Rebuild config file if it doesn't exist
if (!file_exists($this->configFile)) {
ModuleInstaller::handleBaseConfig();
}
$this->ss->assign("configFile", $this->configFile);
$config = ModuleInstaller::getBaseConfig();
$this->ss->assign('configHash', md5(serialize($config)));
$sugarSidecarPath = ensureJSCacheFilesExist();
$this->ss->assign("sugarSidecarPath", $sugarSidecarPath);
// TODO: come up with a better way to deal with the various JS files
// littered in sidecar.tpl.
$voodooFile = 'custom/include/javascript/voodoo.js';
if (SugarAutoLoader::fileExists($voodooFile)) {
$this->ss->assign('voodooFile', $voodooFile);
}
//Load sidecar theme css
$theme = new SidecarTheme();
$this->ss->assign("css_url", $theme->getCSSURL());
$this->ss->assign("developerMode", inDeveloperMode());
//Loading label
$this->ss->assign('LBL_LOADING', $app_strings['LBL_ALERT_TITLE_LOADING']);
$this->ss->assign('LBL_ENABLE_JAVASCRIPT', $app_strings['LBL_ENABLE_JAVASCRIPT']);
$slFunctionsPath = inDeveloperMode() ? "cache/Expressions/functions_cache_debug.js" : "cache/Expressions/functions_cache.js";
if (!is_file($slFunctionsPath)) {
$GLOBALS['updateSilent'] = true;
include "include/Expressions/updatecache.php";
}
$this->ss->assign("SLFunctionsPath", $slFunctionsPath);
if (!empty($this->authorization)) {
$this->ss->assign('appPrefix', $config['env'] . ":" . $config['appId'] . ":");
$this->ss->assign('authorization', $this->authorization);
}
}
示例2: repairBaseConfig
/**
* Rebuilds the base Sidecar configuration file.
*/
public function repairBaseConfig()
{
require_once 'ModuleInstall/ModuleInstaller.php';
ModuleInstaller::handleBaseConfig();
}
示例3: loadCleanConfig
$config_check = $mod_strings['MSG_CONFIG_FILE_READY_FOR_REBUILD'];
$disable_config_rebuild = '';
$config_file_ready = true;
} else {
$config_check = $mod_strings['MSG_MAKE_CONFIG_FILE_WRITABLE'];
}
// only do the rebuild if config file checks out and user has posted back
if (!empty($_POST['perform_rebuild']) && $config_file_ready) {
// retrieve configuration from file so that contents of config_override.php
// is not merged (bug #54403)
$clean_config = loadCleanConfig();
if (rebuildConfigFile($clean_config, $sugar_version)) {
$config_check = $mod_strings['MSG_CONFIG_FILE_REBUILD_SUCCESS'];
$disable_config_rebuild = 'disabled="disabled"';
} else {
$config_check = $mod_strings['MSG_CONFIG_FILE_REBUILD_FAILED'];
}
require_once 'ModuleInstall/ModuleInstaller.php';
ModuleInstaller::handleBaseConfig();
ModuleInstaller::handlePortalConfig();
}
/////////////////////////////////////////////////////////////////////
// TEMPLATE ASSIGNING
$xtpl = new XTemplate('modules/Administration/RebuildConfig.html');
$xtpl->assign('LBL_CONFIG_CHECK', $mod_strings['LBL_CONFIG_CHECK']);
$xtpl->assign('CONFIG_CHECK', $config_check);
$xtpl->assign('LBL_PERFORM_REBUILD', $lbl_rebuild_config);
$xtpl->assign('DISABLE_CONFIG_REBUILD', $disable_config_rebuild);
$xtpl->assign('BTN_PERFORM_REBUILD', $btn_rebuild_config);
$xtpl->parse('main');
$xtpl->out('main');
示例4: handleSidecarConfig
function handleSidecarConfig()
{
require_once 'ModuleInstall/ModuleInstaller.php';
return ModuleInstaller::handleBaseConfig();
}