本文整理汇总了PHP中merge_config_si_settings函数的典型用法代码示例。如果您正苦于以下问题:PHP merge_config_si_settings函数的具体用法?PHP merge_config_si_settings怎么用?PHP merge_config_si_settings使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了merge_config_si_settings函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: logThis
logThis(" Start Building private teams", $path);
upgradeModulesForTeam();
logThis(" Finish Building private teams", $path);
logThis(" Start Building the team_set and team_sets_teams", $path);
upgradeModulesForTeamsets();
logThis(" Finish Building the team_set and team_sets_teams", $path);
logThis(" Start modules/Administration/upgradeTeams.php", $path);
include 'modules/Administration/upgradeTeams.php';
logThis(" Finish modules/Administration/upgradeTeams.php", $path);
if (check_FTS()) {
$GLOBALS['db']->full_text_indexing_setup();
}
}
//bug: 37214 - merge config_si.php settings if available
logThis('Begin merge_config_si_settings', $path);
merge_config_si_settings(true, '', '', $path);
logThis('End merge_config_si_settings', $path);
//Upgrade connectors
logThis('Begin upgrade_connectors', $path);
upgrade_connectors();
logThis('End upgrade_connectors', $path);
//Unlink files that have been removed
if (function_exists('unlinkUpgradeFiles')) {
unlinkUpgradeFiles($sugar_version);
}
if (function_exists('rebuildSprites') && function_exists('imagecreatetruecolor')) {
rebuildSprites(true);
}
//Run repairUpgradeHistoryTable
if (version_compare($sugar_version, '6.5.0', '<') && function_exists('repairUpgradeHistoryTable')) {
repairUpgradeHistoryTable();
示例2: test_silent_upgrade_parameters2
/**
* test_silent_upgrade_parameters2
* This is similar to test_silent_upgrade_parameters except that $argv[0] simulates the current directory
* (imagine the caes of something like >php silentUpgrade.php xxx yyy zzz). This is to prove that the
* merge_config_si_settings() can correctly determine the presence of the config_si.php file given the
* current directory.
*
*/
public function test_silent_upgrade_parameters2()
{
if (!file_exists('config.php')) {
$this->markTestSkipped('Unable to locate config.php file. Skipping test.');
return;
}
if (!file_exists($this->current_working_dir . DIRECTORY_SEPARATOR . 'config_si.php')) {
$this->markTestSkipped('Unable to locate config_si.php file. Skipping test.');
return;
}
//Simulate silent upgrade arguments
global $argv;
$argv[0] = 'config.php';
//This would really be silentUpgrade.php, but this will suffice
$argv[1] = $this->current_working_dir . DIRECTORY_SEPARATOR . 'someZipFile.php';
$argv[2] = $this->current_working_dir . DIRECTORY_SEPARATOR . 'silent_upgrade.log';
$argv[3] = $this->current_working_dir;
$argv[4] = 'admin';
$merge_result = merge_config_si_settings(true);
//$this->assertEquals(true, $merge_result, "Assert that we have merged values");
include 'config.php';
//echo var_export($sugar_config, true);
$this->assertEquals(true, $sugar_config['disable_count_query'], "Assert disable_count_query is set to true.");
$this->assertEquals(true, $sugar_config['external_cache_disabled_apc'], "Assert external_cache_disabled_apc is set to true.");
$this->assertEquals(true, $sugar_config['external_cache_disabled_zend'], "Assert external_cache_disabled_zend is set to true.");
$this->assertEquals(true, $sugar_config['external_cache_disabled_memcache'], "Assert external_cache_disabled_memcache is set to true.");
$this->assertEquals(true, $sugar_config['external_cache_disabled'], "Assert external_cache_disabled is set to true.");
}
示例3: handleSugarConfig
//.........这里部分代码省略.........
$sugar_config['dbconfig']['db_host_name'] = $setup_db_host_name;
if (!empty($setup_db_host_instance)) {
$sugar_config['dbconfig']['db_host_instance'] = $setup_db_host_instance;
} else {
$sugar_config['dbconfig']['db_host_instance'] = '';
}
if (!isset($_SESSION['setup_db_manager'])) {
$_SESSION['setup_db_manager'] = DBManagerFactory::getManagerByType($_SESSION['setup_db_type']);
}
$sugar_config['dbconfig']['db_user_name'] = $setup_db_sugarsales_user;
$sugar_config['dbconfig']['db_password'] = $setup_db_sugarsales_password;
$sugar_config['dbconfig']['db_name'] = $setup_db_database_name;
$sugar_config['dbconfig']['db_type'] = $_SESSION['setup_db_type'];
$sugar_config['dbconfig']['db_port'] = $setup_db_port_num;
$sugar_config['dbconfig']['db_manager'] = $_SESSION['setup_db_manager'];
if (!empty($_SESSION['setup_db_options'])) {
$sugar_config['dbconfigoption'] = array_merge($sugar_config['dbconfigoption'], $_SESSION['setup_db_options']);
}
$sugar_config['cache_dir'] = $cache_dir;
$sugar_config['default_charset'] = $mod_strings['DEFAULT_CHARSET'];
$sugar_config['default_email_client'] = 'sugar';
$sugar_config['default_email_editor'] = 'html';
$sugar_config['host_name'] = $setup_site_host_name;
$sugar_config['js_custom_version'] = '';
$sugar_config['use_real_names'] = true;
$sugar_config['disable_convert_lead'] = false;
$sugar_config['log_dir'] = $setup_site_log_dir;
$sugar_config['log_file'] = $setup_site_log_file;
//Setup FTS
if (!empty($_SESSION['fts_type'])) {
$sugar_config['full_text_engine'] = array($_SESSION['fts_type'] => array('host' => $_SESSION['fts_host'], 'port' => $_SESSION['fts_port']));
}
// for silent install
if (!empty($_SESSION['setup_fts_type'])) {
$sugar_config['full_text_engine'] = array($_SESSION['setup_fts_type'] => array('host' => $_SESSION['setup_fts_host'], 'port' => $_SESSION['setup_fts_port']));
if (isset($_SESSION['setup_fts_hide_config'])) {
$sugar_config['hide_full_text_engine_config'] = $_SESSION['setup_fts_hide_config'];
}
}
/*nsingh(bug 22402): Consolidate logger settings under $config['logger'] as liked by the new logger! If log4pphp exists,
these settings will be overwritten by those in log4php.properties when the user access admin->system settings.*/
$sugar_config['logger'] = array('level' => $setup_site_log_level, 'file' => array('ext' => '.log', 'name' => 'sugarcrm', 'dateFormat' => '%c', 'maxSize' => '10MB', 'maxLogs' => 10, 'suffix' => ''));
$sugar_config['session_dir'] = $setup_site_session_path;
$sugar_config['site_url'] = $setup_site_url;
$sugar_config['sugar_version'] = $setup_sugar_version;
$sugar_config['tmp_dir'] = $cache_dir . 'xml/';
$sugar_config['upload_dir'] = 'upload/';
// $sugar_config['use_php_code_json'] = returnPhpJsonStatus(); // true on error
if (isset($_SESSION['setup_site_sugarbeet_anonymous_stats'])) {
$sugar_config['sugarbeet'] = $_SESSION['setup_site_sugarbeet_anonymous_stats'];
}
$sugar_config['demoData'] = $_SESSION['demoData'];
if (isset($setup_site_guid)) {
$sugar_config['unique_key'] = $setup_site_guid;
}
if (empty($sugar_config['unique_key'])) {
$sugar_config['unique_key'] = md5(create_guid());
}
// add installed langs to config
// entry in upgrade_history comes AFTER table creation
if (isset($_SESSION['INSTALLED_LANG_PACKS']) && is_array($_SESSION['INSTALLED_LANG_PACKS']) && !empty($_SESSION['INSTALLED_LANG_PACKS'])) {
foreach ($_SESSION['INSTALLED_LANG_PACKS'] as $langZip) {
$lang = getSugarConfigLanguageArray($langZip);
if (!empty($lang)) {
$exLang = explode('::', $lang);
if (is_array($exLang) && count($exLang) == 3) {
$sugar_config['languages'][$exLang[0]] = $exLang[1];
}
}
}
}
if (file_exists('install/lang.config.php')) {
include 'install/lang.config.php';
if (!empty($config['languages'])) {
foreach ($config['languages'] as $lang => $label) {
$sugar_config['languages'][$lang] = $label;
}
}
}
ksort($sugar_config);
$sugar_config_string = "<?php\n" . '// created: ' . date('Y-m-d H:i:s') . "\n" . '$sugar_config = ' . var_export($sugar_config, true) . ";\n?>\n";
if ($is_writable && write_array_to_file("sugar_config", $sugar_config, "config.php")) {
// was 'Done'
} else {
echo 'failed<br>';
echo "<p>{$mod_strings['ERR_PERFORM_CONFIG_PHP_1']}</p>\n";
echo "<p>{$mod_strings['ERR_PERFORM_CONFIG_PHP_2']}</p>\n";
echo "<TEXTAREA rows=\"15\" cols=\"80\">" . $sugar_config_string . "</TEXTAREA>";
echo "<p>{$mod_strings['ERR_PERFORM_CONFIG_PHP_3']}</p>";
$bottle[] = $mod_strings['ERR_PERFORM_CONFIG_PHP_4'];
}
//Now merge the config_si.php settings into config.php
if (file_exists('config.php') && file_exists('config_si.php')) {
require_once 'modules/UpgradeWizard/uw_utils.php';
merge_config_si_settings(false, 'config.php', 'config_si.php');
}
//// END $sugar_config
///////////////////////////////////////////////////////////////////////////////
return $bottle;
}
示例4: test_silent_install
public function test_silent_install()
{
if (!file_exists('config.php')) {
$this->markTestSkipped('Unable to locate config.php file. Skipping test.');
return;
}
if (!file_exists('config_si.php')) {
$this->markTestSkipped('Unable to locate config_si.php file. Skipping test.');
return;
}
$merge_result = merge_config_si_settings(false, 'config.php', 'config_si.php');
include 'config.php';
//echo var_export($sugar_config, true);
$this->assertEquals(true, $sugar_config['disable_count_query'], "Assert disable_count_query is set to true.");
$this->assertEquals(true, $sugar_config['external_cache_disabled_apc'], "Assert external_cache_disabled_apc is set to true.");
$this->assertEquals(true, $sugar_config['external_cache_disabled_zend'], "Assert external_cache_disabled_zend is set to true.");
$this->assertEquals(true, $sugar_config['external_cache_disabled_memcache'], "Assert external_cache_disabled_memcache is set to true.");
$this->assertEquals(true, $sugar_config['external_cache_disabled'], "Assert external_cache_disabled is set to true.");
$this->assertTrue(!isset($sugar_config['setup_site_admin_user_name']), "Assert setup_site_admin_user_name is not added to config.php.");
$this->assertTrue(!isset($sugar_config['setup_site_admin_password']), "Assert setup_site_admin_password is not added to config.php.");
}