当前位置: 首页>>代码示例>>PHP>>正文


PHP Configurator::saveConfig方法代码示例

本文整理汇总了PHP中Configurator::saveConfig方法的典型用法代码示例。如果您正苦于以下问题:PHP Configurator::saveConfig方法的具体用法?PHP Configurator::saveConfig怎么用?PHP Configurator::saveConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Configurator的用法示例。


在下文中一共展示了Configurator::saveConfig方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setLastRobin

 function setLastRobin($lastRobin)
 {
     require_once 'modules/Configurator/Configurator.php';
     $cfg = new Configurator();
     $cfg->config['aop']['last_robin'] = $lastRobin;
     $cfg->saveConfig();
 }
开发者ID:omusico,项目名称:windcrm,代码行数:7,代码来源:CaseUpdatesHook.php

示例2: install_aod

function install_aod()
{
    require_once 'modules/Configurator/Configurator.php';
    $cfg = new Configurator();
    if (empty($cfg->config['aod'])) {
        $cfg->config['aod'] = array('enable_aod' => true);
    }
    $cfg->saveConfig();
    addAODSchedulers();
}
开发者ID:omusico,项目名称:SelkirkCRM,代码行数:10,代码来源:AdvancedOpenDiscovery.php

示例3: display

 /** 
  * @see SugarView::display()
  */
 public function display()
 {
     global $mod_strings, $app_strings;
     $admin = Administration::getSettings();
     require 'modules/Trackers/config.php';
     ///////////////////////////////////////////////////////////////////////////////
     ////	HANDLE CHANGES
     if (isset($_POST['process'])) {
         if ($_POST['process'] == 'true') {
             foreach ($tracker_config as $entry) {
                 if (isset($entry['bean'])) {
                     //If checkbox is unchecked, we add the entry into the config table; otherwise delete it
                     if (empty($_POST[$entry['name']])) {
                         $admin->saveSetting('tracker', $entry['name'], 1);
                     } else {
                         $db = DBManagerFactory::getInstance();
                         $db->query("DELETE FROM config WHERE category = 'tracker' and name = '" . $entry['name'] . "'");
                     }
                 }
             }
             //foreach
             //save the tracker prune interval
             if (!empty($_POST['tracker_prune_interval'])) {
                 $admin->saveSetting('tracker', 'prune_interval', $_POST['tracker_prune_interval']);
             }
             //save log slow queries and slow query interval
             $configurator = new Configurator();
             $configurator->saveConfig();
         }
         //if
         header('Location: index.php?module=Administration&action=index');
     }
     echo getClassicModuleTitle("Administration", array("<a href='index.php?module=Administration&action=index'>" . translate('LBL_MODULE_NAME', 'Administration') . "</a>", translate('LBL_TRACKER_SETTINGS', 'Administration')), false);
     $trackerManager = TrackerManager::getInstance();
     $disabledMonitors = $trackerManager->getDisabledMonitors();
     $trackerEntries = array();
     foreach ($tracker_config as $entry) {
         if (isset($entry['bean'])) {
             $disabled = !empty($disabledMonitors[$entry['name']]);
             $trackerEntries[$entry['name']] = array('label' => $mod_strings['LBL_' . strtoupper($entry['name']) . '_DESC'], 'helpLabel' => $mod_strings['LBL_' . strtoupper($entry['name']) . '_HELP'], 'disabled' => $disabled);
         }
     }
     $configurator = new Configurator();
     $this->ss->assign('config', $configurator->config);
     $config_strings = return_module_language($GLOBALS['current_language'], 'Configurator');
     $mod_strings['LOG_SLOW_QUERIES'] = $config_strings['LOG_SLOW_QUERIES'];
     $mod_strings['SLOW_QUERY_TIME_MSEC'] = $config_strings['SLOW_QUERY_TIME_MSEC'];
     $this->ss->assign('mod', $mod_strings);
     $this->ss->assign('app', $app_strings);
     $this->ss->assign('trackerEntries', $trackerEntries);
     $this->ss->assign('tracker_prune_interval', !empty($admin->settings['tracker_prune_interval']) ? $admin->settings['tracker_prune_interval'] : 30);
     $this->ss->display('modules/Trackers/tpls/TrackerSettings.tpl');
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:56,代码来源:view.trackersettings.php

示例4: store_api_key

 public function store_api_key($api, $args)
 {
     if (!isset($args['api_key'])) {
         return array('success' => 0, 'error_code' => '200', 'error_message' => 'No API Key was sent.');
     }
     $api_key = $args['api_key'];
     $configuratorObj = new Configurator();
     //Load config
     $configuratorObj->loadConfig();
     //Update the API setting
     $configuratorObj->config['ClockworkSMSApiKey'] = $api_key;
     //Save the new setting
     $configuratorObj->saveConfig();
     return array('success' => 1);
 }
开发者ID:hectorrios,项目名称:clockworksms_dashlet,代码行数:15,代码来源:ClockworkSMSSenderApi.php

示例5: action_updatewirelessenabledmodules

 public function action_updatewirelessenabledmodules()
 {
     require_once 'modules/Administration/Forms.php';
     global $app_strings, $current_user, $moduleList;
     if (!is_admin($current_user)) {
         sugar_die($app_strings['ERR_NOT_ADMIN']);
     }
     require_once 'modules/Configurator/Configurator.php';
     $configurator = new Configurator();
     $configurator->saveConfig();
     if (isset($_REQUEST['enabled_modules']) && !empty($_REQUEST['enabled_modules'])) {
         $updated_enabled_modules = array();
         foreach (explode(',', $_REQUEST['enabled_modules']) as $e) {
             $updated_enabled_modules[$e] = array();
         }
         // transfer across any pre-existing definitions for the enabled modules from the current module registry
         if (file_exists('include/MVC/Controller/wireless_module_registry.php')) {
             require 'include/MVC/Controller/wireless_module_registry.php';
             if (!empty($wireless_module_registry)) {
                 foreach ($updated_enabled_modules as $e => $def) {
                     if (isset($wireless_module_registry[$e])) {
                         $updated_enabled_modules[$e] = $wireless_module_registry[$e];
                     }
                 }
             }
         }
         $filename = 'custom/include/MVC/Controller/wireless_module_registry.php';
         mkdir_recursive(dirname($filename));
         write_array_to_file('wireless_module_registry', $updated_enabled_modules, $filename);
         foreach ($moduleList as $mod) {
             sugar_cache_clear("CONTROLLER_wireless_module_registry_{$mod}");
         }
         //Users doesn't appear in the normal module list, but its value is cached on login.
         sugar_cache_clear("CONTROLLER_wireless_module_registry_Users");
         sugar_cache_reset();
     }
     echo "true";
 }
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:38,代码来源:controller.php

示例6: getClassicModuleTitle

global $app_strings;
global $theme;
if (!is_admin($current_user)) {
    sugar_die("Unauthorized access to administration.");
}
require_once 'modules/Configurator/Configurator.php';
echo getClassicModuleTitle("Administration", array("<a href='index.php?module=Administration&action=index'>" . translate('LBL_MODULE_NAME', 'Administration') . "</a>", $mod_strings['LBL_AOD_ADMIN_MANAGE_AOD']), false);
$cfg = new Configurator();
$sugar_smarty = new Sugar_Smarty();
$errors = array();
if (!array_key_exists('aod', $cfg->config)) {
    $cfg->config['aod'] = array('enable_aod' => '');
}
if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'save') {
    $cfg->config['aod']['enable_aod'] = !empty($_REQUEST['enable_aod']);
    $cfg->saveConfig();
    header('Location: index.php?module=Administration&action=index');
    exit;
}
$sugar_smarty->assign('MOD', $mod_strings);
$sugar_smarty->assign('APP', $app_strings);
$sugar_smarty->assign('APP_LIST', $app_list_strings);
$sugar_smarty->assign('LANGUAGES', get_languages());
$sugar_smarty->assign("JAVASCRIPT", get_set_focus_js());
$sugar_smarty->assign('config', $cfg->config['aod']);
$sugar_smarty->assign('error', $errors);
$buttons = <<<EOQ
    <input title="{$app_strings['LBL_SAVE_BUTTON_TITLE']}"
                       accessKey="{$app_strings['LBL_SAVE_BUTTON_KEY']}"
                       class="button primary"
                       type="submit"
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:31,代码来源:AODAdmin.php

示例7: Configurator

 function action_saveconfig()
 {
     global $current_user;
     if (!is_admin($current_user)) {
         sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']);
     }
     $configurator = new Configurator();
     if ($configurator->saveConfig() === false) {
         $this->errors = ['company_logo' => $configurator->getError()];
         $this->view = 'edit';
         return;
     }
     $focus = new Administration();
     $focus->saveConfig();
     // Clear the Contacts file b/c portal flag affects rendering
     if (file_exists($cachedfile = sugar_cached('modules/Contacts/EditView.tpl'))) {
         unlink($cachedfile);
     }
     SugarApplication::redirect('index.php?module=Administration&action=index');
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:20,代码来源:controller.php

示例8: Configurator

 function action_saveconfig()
 {
     global $current_user;
     if (!is_admin($current_user)) {
         sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']);
     }
     $configurator = new Configurator();
     $focus = BeanFactory::getBean('Administration');
     $focus->saveConfig();
     $configurator->saveConfig();
     // Clear the Contacts file b/c portal flag affects rendering
     if (file_exists($cachedfile = sugar_cached('modules/Contacts/EditView.tpl'))) {
         unlink($cachedfile);
     }
     echo '<script type="text/javascript">';
     echo 'parent && parent.SUGAR && parent.SUGAR.App && parent.SUGAR.App.sync();';
     echo 'window.location.href = "index.php?module=Administration&action=index";';
     echo '</script>';
     exit;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:20,代码来源:controller.php

示例9: Configurator

foreach ($asterisk_config as $key => $value) {
    if (!isset($sugar_config[$key])) {
        $sugar_config[$key] = '';
        $GLOBALS['sugar_config'][$key] = '';
    }
}
$configurator = new Configurator();
$focus = new Administration();
if (!empty($_POST['save'])) {
    //set defaults for saving
    foreach ($asterisk_config as $key => $value) {
        if (isset($_REQUEST[$key]) && $_REQUEST[$key] == '') {
            $_REQUEST[$key] = $value;
        }
    }
    $configurator->saveConfig();
    $focus->saveConfig();
    header('Location: index.php?module=Administration&action=index');
}
$focus->retrieveSettings();
if (!empty($_POST['restore'])) {
    $configurator->restoreConfig();
}
require_once 'include/Sugar_Smarty.php';
$sugar_smarty = new Sugar_Smarty();
$sugar_smarty->assign('MOD', $mod_strings);
$sugar_smarty->assign('APP', $app_strings);
$sugar_smarty->assign('APP_LIST', $app_list_strings);
$sugar_smarty->assign('config', $configurator->config);
$sugar_smarty->assign('asterisk_config', $asterisk_config);
$sugar_smarty->assign('error', $configurator->errors);
开发者ID:netconstructor,项目名称:yaai,代码行数:31,代码来源:asterisk_configurator.php

示例10: action_updatewirelessenabledmodules

 public function action_updatewirelessenabledmodules()
 {
     require_once 'modules/Administration/Forms.php';
     global $app_strings, $current_user, $moduleList;
     if (!is_admin($current_user)) {
         sugar_die($app_strings['ERR_NOT_ADMIN']);
     }
     require_once 'modules/Configurator/Configurator.php';
     $configurator = new Configurator();
     $configurator->saveConfig();
     if (isset($_REQUEST['enabled_modules']) && !empty($_REQUEST['enabled_modules'])) {
         $updated_enabled_modules = array();
         $wireless_module_registry = array();
         $file = 'include/MVC/Controller/wireless_module_registry.php';
         if (SugarAutoLoader::fileExists($file)) {
             require $file;
         }
         foreach (explode(',', $_REQUEST['enabled_modules']) as $moduleName) {
             $moduleDef = array_key_exists($moduleName, $wireless_module_registry) ? $wireless_module_registry[$moduleName] : array();
             $updated_enabled_modules[$moduleName] = $moduleDef;
         }
         $filename = create_custom_directory('include/MVC/Controller/wireless_module_registry.php');
         mkdir_recursive(dirname($filename));
         write_array_to_file('wireless_module_registry', $updated_enabled_modules, $filename);
         foreach ($moduleList as $mod) {
             sugar_cache_clear("CONTROLLER_wireless_module_registry_{$mod}");
         }
         //Users doesn't appear in the normal module list, but its value is cached on login.
         sugar_cache_clear("CONTROLLER_wireless_module_registry_Users");
         sugar_cache_reset();
         // Bug 59121 - Clear the metadata cache for the mobile platform
         MetaDataManager::refreshCache(array('mobile'));
     }
     echo "true";
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:35,代码来源:controller.php

示例11: Configurator

 function action_saveconfig()
 {
     global $current_user;
     if (!is_admin($current_user)) {
         sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']);
     }
     $configurator = new Configurator();
     $configurator->saveConfig();
     $focus = new Administration();
     $focus->saveConfig();
     // Clear the Contacts file b/c portal flag affects rendering
     if (file_exists($GLOBALS['sugar_config']['cache_dir'] . 'modules/Contacts/EditView.tpl')) {
         unlink($GLOBALS['sugar_config']['cache_dir'] . 'modules/Contacts/EditView.tpl');
     }
     SugarApplication::redirect('index.php?module=Administration&action=index');
 }
开发者ID:razorinc,项目名称:sugarcrm-example,代码行数:16,代码来源:controller.php

示例12: action_updatewirelessenabledmodules

 public function action_updatewirelessenabledmodules()
 {
     require_once 'modules/Administration/Forms.php';
     global $mod_strings;
     global $app_list_strings;
     global $app_strings;
     global $current_user;
     if (!is_admin($current_user)) {
         sugar_die($app_strings['ERR_NOT_ADMIN']);
     }
     require_once 'modules/Configurator/Configurator.php';
     $configurator = new Configurator();
     $configurator->saveConfig();
     if (isset($_REQUEST['enabled_modules']) && !empty($_REQUEST['enabled_modules'])) {
         $updated_enabled_modules = array();
         foreach (explode(',', $_REQUEST['enabled_modules']) as $e) {
             $updated_enabled_modules[$e] = array();
         }
         // transfer across any pre-existing definitions for the enabled modules from the current module registry
         if (file_exists('include/MVC/Controller/wireless_module_registry.php')) {
             require 'include/MVC/Controller/wireless_module_registry.php';
             if (!empty($wireless_module_registry)) {
                 foreach ($updated_enabled_modules as $e => $def) {
                     if (isset($wireless_module_registry[$e])) {
                         $updated_enabled_modules[$e] = $wireless_module_registry[$e];
                     }
                 }
             }
         }
         $filename = 'custom/include/MVC/Controller/wireless_module_registry.php';
         mkdir_recursive(dirname($filename));
         write_array_to_file('wireless_module_registry', $updated_enabled_modules, $filename);
     }
     echo "true";
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:35,代码来源:controller.php

示例13: Configurator

 function action_saveconfig()
 {
     $configurator = new Configurator();
     $configurator->saveConfig();
     $focus = new Administration();
     $focus->saveConfig();
     // Clear the Contacts file b/c portal flag affects rendering
     if (file_exists($GLOBALS['sugar_config']['cache_dir'] . 'modules/Contacts/EditView.tpl')) {
         unlink($GLOBALS['sugar_config']['cache_dir'] . 'modules/Contacts/EditView.tpl');
     }
     SugarApplication::redirect('index.php?module=Administration&action=index');
 }
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:12,代码来源:controller.php


注:本文中的Configurator::saveConfig方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。