本文整理汇总了PHP中Configurator::parseLoggerSettings方法的典型用法代码示例。如果您正苦于以下问题:PHP Configurator::parseLoggerSettings方法的具体用法?PHP Configurator::parseLoggerSettings怎么用?PHP Configurator::parseLoggerSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Configurator
的用法示例。
在下文中一共展示了Configurator::parseLoggerSettings方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
/**
* @see SugarView::display()
*/
public function display()
{
global $current_user, $mod_strings, $app_strings, $app_list_strings, $sugar_config, $locale;
$configurator = new Configurator();
$sugarConfig = SugarConfig::getInstance();
$focus = new Administration();
$configurator->parseLoggerSettings();
$focus->retrieveSettings();
if (!empty($_POST['restore'])) {
$configurator->restoreConfig();
}
$this->ss->assign('MOD', $mod_strings);
$this->ss->assign('APP', $app_strings);
$this->ss->assign('APP_LIST', $app_list_strings);
$this->ss->assign('config', $configurator->config);
$this->ss->assign('error', $configurator->errors);
$this->ss->assign("AUTO_REFRESH_INTERVAL_OPTIONS", get_select_options_with_id($app_list_strings['dashlet_auto_refresh_options_admin'], isset($configurator->config['dashlet_auto_refresh_min']) ? $configurator->config['dashlet_auto_refresh_min'] : 30));
$this->ss->assign('LANGUAGES', get_languages());
$this->ss->assign("JAVASCRIPT", get_set_focus_js() . get_configsettings_js());
$this->ss->assign('company_logo', SugarThemeRegistry::current()->getImageURL('company_logo.png'));
$this->ss->assign("settings", $focus->settings);
$this->ss->assign("mail_sendtype_options", get_select_options_with_id($app_list_strings['notifymail_sendtype'], $focus->settings['mail_sendtype']));
if (!empty($focus->settings['proxy_on'])) {
$this->ss->assign("PROXY_CONFIG_DISPLAY", 'inline');
} else {
$this->ss->assign("PROXY_CONFIG_DISPLAY", 'none');
}
if (!empty($focus->settings['proxy_auth'])) {
$this->ss->assign("PROXY_AUTH_DISPLAY", 'inline');
} else {
$this->ss->assign("PROXY_AUTH_DISPLAY", 'none');
}
if (!empty($configurator->config['logger']['level'])) {
$this->ss->assign('log_levels', get_select_options_with_id(LoggerManager::getLoggerLevels(), $configurator->config['logger']['level']));
} else {
$this->ss->assign('log_levels', get_select_options_with_id(LoggerManager::getLoggerLevels(), ''));
}
if (!empty($configurator->config['lead_conv_activity_opt'])) {
$this->ss->assign('lead_conv_activities', get_select_options_with_id(Lead::getActivitiesOptions(), $configurator->config['lead_conv_activity_opt']));
} else {
$this->ss->assign('lead_conv_activities', get_select_options_with_id(Lead::getActivitiesOptions(), ''));
}
if (!empty($configurator->config['logger']['file']['suffix'])) {
$this->ss->assign('filename_suffix', get_select_options_with_id(SugarLogger::$filename_suffix, $configurator->config['logger']['file']['suffix']));
} else {
$this->ss->assign('filename_suffix', get_select_options_with_id(SugarLogger::$filename_suffix, ''));
}
echo $this->getModuleTitle(false);
$this->ss->display('modules/Configurator/tpls/EditView.tpl');
$javascript = new javascript();
$javascript->setFormName("ConfigureSettings");
$javascript->addFieldGeneric("notify_fromaddress", "email", $mod_strings['LBL_NOTIFY_FROMADDRESS'], TRUE, "");
$javascript->addFieldGeneric("notify_subject", "varchar", $mod_strings['LBL_NOTIFY_SUBJECT'], TRUE, "");
$javascript->addFieldGeneric("proxy_host", "varchar", $mod_strings['LBL_PROXY_HOST'], TRUE, "");
$javascript->addFieldGeneric("proxy_port", "int", $mod_strings['LBL_PROXY_PORT'], TRUE, "");
$javascript->addFieldGeneric("proxy_password", "varchar", $mod_strings['LBL_PROXY_PASSWORD'], TRUE, "");
$javascript->addFieldGeneric("proxy_username", "varchar", $mod_strings['LBL_PROXY_USERNAME'], TRUE, "");
echo $javascript->getScript();
}
示例2: foreach
foreach ($key as $k) {
$admin->saveSetting($category, $k, $value);
}
}
}
}
// Mark the instance as having gone thru the admin wizard
$admin = new Administration();
$admin->saveSetting('system', 'adminwizard', 1);
/////////////////////////Old Logger settings///////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
if (file_exists('modules/Configurator/Configurator.php')) {
require_once 'include/utils/array_utils.php';
require_once 'modules/Configurator/Configurator.php';
$Configurator = new Configurator();
$Configurator->parseLoggerSettings();
}
//unset the logger previously instantiated
if (file_exists('include/SugarLogger/LoggerManager.php')) {
unset($GLOBALS['log']);
$GLOBALS['log'] = LoggerManager::getLogger('SugarCRM');
}
//Upgrade connectors
/*
if($_SESSION['current_db_version'] < '610' && function_exists('upgrade_connectors'))
{
upgrade_connectors($path);
}
*/
// Enable the InsideView connector by default
if ($_SESSION['current_db_version'] < '621' && function_exists('upgradeEnableInsideViewConnector')) {
示例3: Administration
function action_saveadminwizard()
{
global $current_user;
if (!is_admin($current_user)) {
sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']);
}
$focus = new Administration();
$focus->retrieveSettings();
$focus->saveConfig();
$configurator = new Configurator();
$configurator->populateFromPost();
$configurator->handleOverride();
$configurator->parseLoggerSettings();
$configurator->saveConfig();
// Bug 37310 - Delete any existing currency that matches the one we've just set the default to during the admin wizard
$currency = new Currency();
$currency->retrieve($currency->retrieve_id_by_name($_REQUEST['default_currency_name']));
if (!empty($currency->id) && $currency->symbol == $_REQUEST['default_currency_symbol'] && $currency->iso4217 == $_REQUEST['default_currency_iso4217']) {
$currency->deleted = 1;
$currency->save();
}
SugarApplication::redirect('index.php?module=Users&action=Wizard&skipwelcome=1');
}
示例4: display
/**
* @see SugarView::display()
*/
public function display()
{
global $current_user, $mod_strings, $app_strings, $app_list_strings, $sugar_config, $locale;
$configurator = new Configurator();
$sugarConfig = SugarConfig::getInstance();
$focus = new Administration();
$configurator->parseLoggerSettings();
$focus->retrieveSettings();
if (!empty($_POST['restore'])) {
$configurator->restoreConfig();
}
$this->ss->assign('MOD', $mod_strings);
$this->ss->assign('APP', $app_strings);
$this->ss->assign('APP_LIST', $app_list_strings);
$this->ss->assign('config', $configurator->config);
$this->ss->assign('error', $configurator->errors);
$this->ss->assign("AUTO_REFRESH_INTERVAL_OPTIONS", get_select_options_with_id($app_list_strings['dashlet_auto_refresh_options_admin'], isset($configurator->config['dashlet_auto_refresh_min']) ? $configurator->config['dashlet_auto_refresh_min'] : 30));
$this->ss->assign('LANGUAGES', get_languages());
$this->ss->assign("JAVASCRIPT", get_set_focus_js() . get_configsettings_js());
$this->ss->assign('company_logo', SugarThemeRegistry::current()->getImageURL('company_logo.png'));
$this->ss->assign("settings", $focus->settings);
$this->ss->assign("mail_sendtype_options", get_select_options_with_id($app_list_strings['notifymail_sendtype'], $focus->settings['mail_sendtype']));
if (!empty($focus->settings['proxy_on'])) {
$this->ss->assign("PROXY_CONFIG_DISPLAY", 'inline');
} else {
$this->ss->assign("PROXY_CONFIG_DISPLAY", 'none');
}
if (!empty($focus->settings['proxy_auth'])) {
$this->ss->assign("PROXY_AUTH_DISPLAY", 'inline');
} else {
$this->ss->assign("PROXY_AUTH_DISPLAY", 'none');
}
if (!empty($configurator->config['logger']['level'])) {
$this->ss->assign('log_levels', get_select_options_with_id(LoggerManager::getLoggerLevels(), $configurator->config['logger']['level']));
} else {
$this->ss->assign('log_levels', get_select_options_with_id(LoggerManager::getLoggerLevels(), ''));
}
if (!empty($configurator->config['lead_conv_activity_opt'])) {
$this->ss->assign('lead_conv_activities', get_select_options_with_id(Lead::getActivitiesOptions(), $configurator->config['lead_conv_activity_opt']));
} else {
$this->ss->assign('lead_conv_activities', get_select_options_with_id(Lead::getActivitiesOptions(), ''));
}
if (!empty($configurator->config['logger']['file']['suffix'])) {
$this->ss->assign('filename_suffix', get_select_options_with_id(SugarLogger::$filename_suffix, $configurator->config['logger']['file']['suffix']));
} else {
$this->ss->assign('filename_suffix', get_select_options_with_id(SugarLogger::$filename_suffix, ''));
}
if (isset($configurator->config['logger_visible'])) {
$this->ss->assign('logger_visible', $configurator->config['logger_visible']);
} else {
$this->ss->assign('logger_visible', true);
}
$ebay_site_ids = array('0' => 'eBay United States', '2' => 'eBay Canada (English)', '3' => 'eBay UK', '15' => 'eBay Australia', '16' => 'eBay Austria', '23' => 'eBay Belgium (French)', '71' => 'eBay France', '77' => 'eBay Germany', '100' => 'eBay Motors', '101' => 'eBay Italy', '123' => 'eBay Belgium (Dutch)', '146' => 'eBay Netherlands', '186' => 'eBay Spain', '193' => 'eBay Switzerland', '201' => 'eBay Hong Kong', '203' => 'eBay India', '205' => 'eBay Ireland', '207' => 'eBay Malaysia', '210' => 'eBay Canada (French)', '211' => 'eBay Philippines', '212' => 'eBay Poland', '216' => 'eBay Singapore');
$this->ss->assign("EBAY_SITE_ID_OPTIONS", get_select_options_with_id($ebay_site_ids, isset($configurator->config['ebay_primary_site_id']) ? $configurator->config['ebay_primary_site_id'] : 0));
require_once 'modules/xeBayOrders/xeBayOrder.php';
$this->ss->assign("EBAY_SHIPPING_SERVICE_OPTIONS", get_select_options_with_id(getShippingServiceDropDown(), isset($configurator->config['ebay_shipping_service']) ? $configurator->config['ebay_shipping_service'] : 'HKBAM'));
$this->ss->assign("EBAY_EXPRESS_CARRIER_OPTIONS", get_select_options_with_id(getExpressCarrierDropDown(), isset($configurator->config['ebay_express_carrier']) ? $configurator->config['ebay_express_carrier'] : 'default'));
echo $this->getModuleTitle(false);
$this->ss->display('modules/Configurator/tpls/EditView.tpl');
$javascript = new javascript();
$javascript->setFormName("ConfigureSettings");
$javascript->addFieldGeneric("notify_fromaddress", "email", $mod_strings['LBL_NOTIFY_FROMADDRESS'], TRUE, "");
$javascript->addFieldGeneric("notify_subject", "varchar", $mod_strings['LBL_NOTIFY_SUBJECT'], TRUE, "");
$javascript->addFieldGeneric("proxy_host", "varchar", $mod_strings['LBL_PROXY_HOST'], TRUE, "");
$javascript->addFieldGeneric("proxy_port", "int", $mod_strings['LBL_PROXY_PORT'], TRUE, "");
$javascript->addFieldGeneric("proxy_password", "varchar", $mod_strings['LBL_PROXY_PASSWORD'], TRUE, "");
$javascript->addFieldGeneric("proxy_username", "varchar", $mod_strings['LBL_PROXY_USERNAME'], TRUE, "");
echo $javascript->getScript();
}
示例5: Administration
function action_saveadminwizard()
{
global $current_user;
if (!is_admin($current_user)) {
sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']);
}
$focus = new Administration();
$focus->retrieveSettings();
$focus->saveConfig();
$configurator = new Configurator();
$configurator->populateFromPost();
$configurator->handleOverride();
$configurator->parseLoggerSettings();
$configurator->saveConfig();
//The save of the admin wizard stops the post silent install from re-showing the admin wizard on each login
$postSilentInstallAdminWizardCompleted = $current_user->getPreference('postSilentInstallAdminWizardCompleted');
if (isset($postSilentInstallAdminWizardCompleted) && !$postSilentInstallAdminWizardCompleted) {
$current_user->setPreference('postSilentInstallAdminWizardCompleted', true);
}
// Bug 37310 - Delete any existing currency that matches the one we've just set the default to during the admin wizard
$currency = new Currency();
$currency->retrieve($currency->retrieve_id_by_name($_REQUEST['default_currency_name']));
if (!empty($currency->id) && $currency->symbol == $_REQUEST['default_currency_symbol'] && $currency->iso4217 == $_REQUEST['default_currency_iso4217']) {
$currency->deleted = 1;
$currency->save();
}
//Only process the scenario item for admin users!
if ($current_user->isAdmin()) {
//Process the scenarios selected in the wizard
require_once 'install/suite_install/enabledTabs.php';
//We need to load the tabs so that we can remove those which are scenario based and un-selected
//Remove the custom tabConfig as this overwrites the complete list containined in the include/tabConfig.php
if (file_exists('custom/include/tabConfig.php')) {
unlink('custom/include/tabConfig.php');
}
require_once 'include/tabConfig.php';
//Remove the custom dashlet so that we can use the complete list of defaults to filter by category
if (file_exists('custom/modules/Home/dashlets.php')) {
unlink('custom/modules/Home/dashlets.php');
}
//Check if the folder is in place
if (!file_exists('custom/modules/Home')) {
sugar_mkdir('custom/modules/Home', 0775);
}
//Check if the folder is in place
if (!file_exists('custom/include')) {
sugar_mkdir('custom/include', 0775);
}
require_once 'modules/Home/dashlets.php';
require_once 'install/suite_install/scenarios.php';
foreach ($installation_scenarios as $scenario) {
//If the item is not in $_SESSION['scenarios'], then unset them as they are not required
if (!in_array($scenario['key'], $_REQUEST['scenarios'])) {
foreach ($scenario['modules'] as $module) {
if (($removeKey = array_search($module, $enabled_tabs)) !== false) {
unset($enabled_tabs[$removeKey]);
}
}
//Loop through the dashlets to remove from the default home page based on this scenario
foreach ($scenario['dashlets'] as $dashlet) {
//if (($removeKey = array_search($dashlet, $defaultDashlets)) !== false) {
// unset($defaultDashlets[$removeKey]);
// }
if (isset($defaultDashlets[$dashlet])) {
unset($defaultDashlets[$dashlet]);
}
}
//If the scenario has an associated group tab, remove accordingly (by not adding to the custom tabconfig.php
if (isset($scenario['groupedTabs'])) {
unset($GLOBALS['tabStructure'][$scenario['groupedTabs']]);
}
}
}
//Have a 'core' options, with accounts / contacts if no other scenario is selected
if (!is_null($_SESSION['scenarios'])) {
unset($GLOBALS['tabStructure']['LBL_TABGROUP_DEFAULT']);
}
//Write the tabstructure to custom so that the grouping are not shown for the un-selected scenarios
$fp = sugar_fopen('custom/include/tabConfig.php', 'w');
$fileContents = "<?php \n" . '$GLOBALS["tabStructure"] =' . var_export($GLOBALS['tabStructure'], true) . ';';
fwrite($fp, $fileContents);
fclose($fp);
//Write the dashlets to custom so that the dashlets are not shown for the un-selected scenarios
$fp = sugar_fopen('custom/modules/Home/dashlets.php', 'w');
$fileContents = "<?php \n" . '$defaultDashlets =' . var_export($defaultDashlets, true) . ';';
fwrite($fp, $fileContents);
fclose($fp);
// End of the scenario implementations
}
SugarApplication::redirect('index.php?module=Users&action=Wizard&skipwelcome=1');
}
示例6: Administration
function action_saveadminwizard()
{
$focus = new Administration();
$focus->retrieveSettings();
$focus->saveConfig();
$configurator = new Configurator();
$configurator->populateFromPost();
$configurator->handleOverride();
$configurator->parseLoggerSettings();
$configurator->saveConfig();
SugarApplication::redirect('index.php?module=Users&action=Wizard&skipwelcome=1');
}