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


PHP Administration::getSettings方法代码示例

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


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

示例1: BreadCrumbStack

 /**
  * BreadCrumbStack
  * Constructor for BreadCrumbStack that builds list of breadcrumbs using tracker table
  * 
  * @param $user_id String value of user id to get bread crumb items for
  * @param $modules mixed value of module name(s) to provide extra filtering
  */
 public function BreadCrumbStack($user_id, $modules = '')
 {
     $this->stack = array();
     $this->stackMap = array();
     $admin = Administration::getSettings('tracker');
     $this->deleteInvisible = !empty($admin->settings['tracker_Tracker']);
     $db = DBManagerFactory::getInstance();
     $module_query = '';
     if (!empty($modules)) {
         $history_max_viewed = 10;
         $module_query = is_array($modules) ? ' AND module_name IN (\'' . implode("','", $modules) . '\')' : ' AND module_name = \'' . $modules . '\'';
     } else {
         $history_max_viewed = !empty($GLOBALS['sugar_config']['history_max_viewed']) ? $GLOBALS['sugar_config']['history_max_viewed'] : 50;
     }
     $query = 'SELECT distinct item_id AS item_id, id, item_summary, module_name, monitor_id, date_modified FROM tracker WHERE user_id = \'' . $user_id . '\' AND deleted = 0 AND visible = 1 ' . $module_query . ' ORDER BY date_modified DESC';
     $result = $db->limitQuery($query, 0, $history_max_viewed);
     $items = array();
     while ($row = $db->fetchByAssoc($result)) {
         $items[] = $row;
     }
     $items = array_reverse($items);
     foreach ($items as $item) {
         $this->push($item);
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:32,代码来源:BreadCrumbStack.php

示例2: sendHeartbeat

 /**
  * Sends $info to heartbeat server
  *
  * @param $info
  * @return bool
  */
 protected function sendHeartbeat($info)
 {
     $license = Administration::getSettings('license');
     $client = $this->getClient();
     $client->sugarHome($license->settings['license_key'], $info);
     return !$client->getError();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:13,代码来源:SugarJobHeartbeat.php

示例3: createLeadRecord

 /**
  * Creates lead records
  * @param $apiServiceBase The API class of the request, used in cases where the API changes how the fields are pulled from the args array.
  * @param $args array The arguments array passed in from the API
  * @return array properties on lead bean formatted for display
  */
 public function createLeadRecord($api, $args)
 {
     // Bug 54647 Lead registration can create empty leads
     if (!isset($args['last_name'])) {
         throw new SugarApiExceptionMissingParameter();
     }
     /**
      *
      * Bug56194: This API can be hit without logging into Sugar, but the creation of a Lead SugarBean
      * uses messages that require the use of the app strings.
      *
      **/
     global $app_list_strings;
     global $current_language;
     if (!isset($app_list_strings)) {
         $app_list_strings = return_app_list_strings_language($current_language);
     }
     $bean = BeanFactory::newBean('Leads');
     // we force team and teamset because there is no current user to get them from
     $fields = array('team_set_id' => '1', 'team_id' => '1', 'lead_source' => 'Support Portal User Registration');
     $admin = Administration::getSettings();
     if (isset($admin->settings['portal_defaultUser']) && !empty($admin->settings['portal_defaultUser'])) {
         $fields['assigned_user_id'] = json_decode(html_entity_decode($admin->settings['portal_defaultUser']));
     }
     $fieldList = array('first_name', 'last_name', 'phone_work', 'email', 'primary_address_country', 'primary_address_state', 'account_name', 'title', 'preferred_language');
     foreach ($fieldList as $fieldName) {
         if (isset($args[$fieldName])) {
             $fields[$fieldName] = $args[$fieldName];
         }
     }
     $id = $this->updateBean($bean, $api, $fields);
     return $id;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:39,代码来源:RegisterLeadApi.php

示例4: process_workflow_alerts

function process_workflow_alerts(&$target_module, $alert_user_array, $alert_shell_array, $check_for_bridge = false)
{
    $admin = Administration::getSettings();
    /*
    	What is shadow module for? - Shadow module is when you are using this function to process invites for
    	meetings and calls.  This is down via child module (bridge), however we still use the parent base_module
    	to gather our recipients, since this is how our UI handles it.
    When shadow module is set, we should use that as the target module.
    */
    if (!empty($target_module->bridge_object) && $check_for_bridge == true) {
        $temp_target_module = $target_module->bridge_object;
    } else {
        $temp_target_module = $target_module;
    }
    $alert_msg = $alert_shell_array['alert_msg'];
    $address_array = array();
    $address_array['to'] = array();
    $address_array['cc'] = array();
    $address_array['bcc'] = array();
    //loop through get each users token information
    if (!empty($alert_user_array)) {
        foreach ($alert_user_array as $user_meta_array) {
            get_user_alert_details($temp_target_module, $user_meta_array, $address_array);
            //end foreach alert_user_array
        }
    }
    //now you have the bucket so you can send out the alert to all the recipients
    send_workflow_alert($target_module, $address_array, $alert_msg, $admin, $alert_shell_array, $check_for_bridge, $alert_user_array);
    //end function process_workflow_alerts
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:30,代码来源:alert_utils.php

示例5: initiateFTSIndexer

 /**
  * Initiate the FTS indexer.  Once initiated, all work will be done by the FTS consumers which will be invoked
  * by the job queue system.
  *
  * @param array $modules             Modules to index
  * @param bool  $deleteExistingData Remove existing index
  * @param bool  $runNow             Run indexing jobs immediately instead of placing them in job queue
  * @return SugarSearchEngineFullIndexer
  */
 public function initiateFTSIndexer(array $modules = array(), $deleteExistingData = true, $runNow = false)
 {
     $startTime = microtime(true);
     $GLOBALS['log']->info("Populating Full System Index Queue at {$startTime}");
     if (!$this->SSEngine instanceof SugarSearchEngineAbstractBase) {
         $GLOBALS['log']->info("No FTS engine enabled, not doing anything");
         return false;
     }
     $allModules = !empty($modules) ? $modules : array_keys(SugarSearchEngineMetadataHelper::retrieveFtsEnabledFieldsForAllModules());
     // Create the index on the server side
     $this->SSEngine->createIndex($deleteExistingData, $allModules);
     // Clear the existing queue
     $this->clearFTSIndexQueue($allModules);
     // clear flag
     $admin = Administration::getSettings();
     if (!empty($admin->settings['info_fts_index_done'])) {
         $admin->saveSetting('info', 'fts_index_done', 0);
     }
     $totalCount = 0;
     foreach ($allModules as $module) {
         $totalCount += $this->populateIndexQueueForModule($module, $runNow);
     }
     $totalTime = number_format(round(microtime(true) - $startTime, 2), 2);
     $this->results['totalTime'] = $totalTime;
     $GLOBALS['log']->info("Total time to populate full system index queue: {$totalTime} (s)");
     $avgRecs = $totalCount != 0 && $totalTime != 0 ? number_format(round($totalCount / $totalTime, 2), 2) : 0;
     $GLOBALS['log']->info("Total number of modules queued: {$totalCount} , modules per sec. {$avgRecs}");
     return $this;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:38,代码来源:SugarSearchEngineFullIndexer.php

示例6: display

 function display()
 {
     $admin = Administration::getSettings();
     if (isset($admin->settings['portal_on']) && $admin->settings['portal_on']) {
         $this->ss->assign("PORTAL_ENABLED", true);
     }
     parent::display();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:8,代码来源:view.detail.php

示例7: loadConfigArgs

 /**
  * Get Settings from the Config Table.
  */
 public function loadConfigArgs()
 {
     /* @var $admin Administration */
     $admin = Administration::getSettings();
     $settings = $admin->getConfigForModule('Forecasts');
     // decode and json decode the settings from the administration to set the sales stages for closed won and closed lost
     $this->setArg('sales_stage_won', $settings["sales_stage_won"]);
     $this->setArg('sales_stage_lost', $settings["sales_stage_lost"]);
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:12,代码来源:AbstractProgress.php

示例8: display

 /**
  * @see SugarView::display()
  */
 public function display()
 {
     global $current_user, $mod_strings, $app_list_strings, $sugar_config, $locale, $sugar_version;
     if (!is_admin($current_user)) {
         sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']);
     }
     $themeObject = SugarThemeRegistry::current();
     $configurator = new Configurator();
     $sugarConfig = SugarConfig::getInstance();
     $focus = Administration::getSettings();
     $ut = $GLOBALS['current_user']->getPreference('ut');
     if (empty($ut)) {
         $this->ss->assign('SKIP_URL', 'index.php?module=Users&action=Wizard&skipwelcome=1');
     } else {
         $this->ss->assign('SKIP_URL', 'index.php?module=Home&action=index');
     }
     // Always mark that we have got past this point
     $focus->saveSetting('system', 'adminwizard', 1);
     $css = $themeObject->getCSS();
     $favicon = $themeObject->getImageURL('sugar_icon.ico', false);
     $this->ss->assign('FAVICON_URL', getJSPath($favicon));
     $this->ss->assign('SUGAR_CSS', $css);
     $this->ss->assign('MOD_USERS', return_module_language($GLOBALS['current_language'], 'Users'));
     $this->ss->assign('CSS', '<link rel="stylesheet" type="text/css" href="' . SugarThemeRegistry::current()->getCSSURL('wizard.css') . '" />');
     $this->ss->assign('LANGUAGES', get_languages());
     $this->ss->assign('config', $sugar_config);
     $this->ss->assign('SUGAR_VERSION', $sugar_version);
     $this->ss->assign('settings', $focus->settings);
     $this->ss->assign('exportCharsets', get_select_options_with_id($locale->getCharsetSelect(), $sugar_config['default_export_charset']));
     $this->ss->assign('getNameJs', $locale->getNameJs());
     $this->ss->assign('NAMEFORMATS', $locale->getUsableLocaleNameOptions($sugar_config['name_formats']));
     $this->ss->assign('JAVASCRIPT', get_set_focus_js() . get_configsettings_js());
     $this->ss->assign('company_logo', SugarThemeRegistry::current()->getImageURL('company_logo.png', true, true));
     $this->ss->assign('mail_smtptype', $focus->settings['mail_smtptype']);
     $this->ss->assign('mail_smtpserver', $focus->settings['mail_smtpserver']);
     $this->ss->assign('mail_smtpport', $focus->settings['mail_smtpport']);
     $this->ss->assign('mail_smtpuser', $focus->settings['mail_smtpuser']);
     $this->ss->assign('mail_smtppass', $focus->settings['mail_smtppass']);
     $this->ss->assign('mail_smtpauth_req', $focus->settings['mail_smtpauth_req'] ? "checked='checked'" : '');
     $this->ss->assign('MAIL_SSL_OPTIONS', get_select_options_with_id($app_list_strings['email_settings_for_ssl'], $focus->settings['mail_smtpssl']));
     $this->ss->assign('notify_allow_default_outbound_on', !empty($focus->settings['notify_allow_default_outbound']) && $focus->settings['notify_allow_default_outbound'] == 2 ? 'CHECKED' : '');
     $this->ss->assign('THEME', SugarThemeRegistry::current()->__toString());
     // get javascript
     ob_start();
     $this->options['show_javascript'] = true;
     $this->renderJavascript();
     $this->options['show_javascript'] = false;
     $this->ss->assign("SUGAR_JS", ob_get_contents() . $themeObject->getJS());
     ob_end_clean();
     $this->ss->assign('langHeader', get_language_header());
     $this->ss->assign('START_PAGE', !empty($_REQUEST['page']) ? $_REQUEST['page'] : 'welcome');
     $this->ss->display('modules/Configurator/tpls/adminwizard.tpl');
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:56,代码来源:view.adminwizard.php

示例9: 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

示例10: clearFTSFlags

 /**
  * After the notification is displayed, clear the fts flags
  * @return null
  */
 protected function clearFTSFlags()
 {
     if (is_admin($GLOBALS['current_user'])) {
         $admin = Administration::getSettings();
         if (!empty($settings->settings['info_fts_index_done'])) {
             $admin->saveSetting('info', 'fts_index_done', 0);
         }
         // remove notification disabled notification
         $cfg = new Configurator();
         $cfg->config['fts_disable_notification'] = false;
         $cfg->handleOverride();
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:17,代码来源:view.systemquicklist.php

示例11: setup

 /**
  * setup
  * This is a private method used to load the configuration settings whereby
  * monitors may be disabled via the Admin settings interface
  *
  */
 private function setup($skip_setup = false)
 {
     if (!empty($this->metadata) && empty($GLOBALS['installing']) && empty($skip_setup)) {
         $admin = Administration::getSettings('tracker');
         foreach ($this->metadata as $key => $entry) {
             if (isset($entry['bean'])) {
                 if (!empty($admin->settings['tracker_' . $entry['name']])) {
                     $this->disabledMonitors[$entry['name']] = true;
                 }
             }
         }
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:19,代码来源:TrackerManager.php

示例12: setProxyOptions

 /**
  * Sets the proxy options
  * @param array $curlOptions
  * @return array $curlOptions
  */
 public function setProxyOptions($curlOptions)
 {
     //detects if the sugar proxy setting is on
     //if yes we need to append it to the curlOptions
     /* CURL SET PROXY CONFIG USING SUGAR SYSTEM SETTINGS */
     $proxy_config = Administration::getSettings('proxy');
     if (!empty($proxy_config) && !empty($proxy_config->settings['proxy_on']) && $proxy_config->settings['proxy_on'] === 1) {
         $curlOptions[CURLOPT_PROXY] = $proxy_config->settings['proxy_host'];
         $curlOptions[CURLOPT_PROXYPORT] = $proxy_config->settings['proxy_port'];
         if (!empty($proxy_settings['proxy_auth'])) {
             $curlOptions[CURLOPT_PROXYUSERPWD] = $proxy_settings['proxy_username'] . ':' . $proxy_settings['proxy_password'];
         }
     }
     return $curlOptions;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:20,代码来源:DnbCurlWrapper.php

示例13: display

 /**
  * This function loads portal config vars from db and sets them for the view
  * @see SugarView::display() for more info
  */
 function display()
 {
     $portalFields = array('appStatus' => 'offline', 'logoURL' => '', 'maxQueryResult' => '20', 'maxSearchQueryResult' => '5', 'defaultUser' => '');
     $userList = get_user_array();
     $userList[''] = '';
     require_once "modules/MySettings/TabController.php";
     $controller = new TabController();
     $disabledModulesFlag = false;
     $disabledModules = array_diff($controller->getAllPortalTabs(), $controller->getPortalTabs());
     if (!empty($disabledModules)) {
         $disabledModulesFlag = true;
         array_walk($disabledModules, function (&$item) {
             $item = translate($item);
         });
     }
     $admin = Administration::getSettings();
     $portalConfig = $admin->getConfigForModule('portal', 'support', true);
     $portalConfig['appStatus'] = !empty($portalConfig['on']) ? 'online' : 'offline';
     $smarty = new Sugar_Smarty();
     $smarty->assign('disabledDisplayModulesList', $disabledModules);
     $smarty->assign('disabledDisplayModules', $disabledModulesFlag);
     foreach ($portalFields as $fieldName => $fieldDefault) {
         if (isset($portalConfig[$fieldName])) {
             $smarty->assign($fieldName, html_entity_decode($portalConfig[$fieldName]));
         } else {
             $smarty->assign($fieldName, $fieldDefault);
         }
     }
     $smarty->assign('userList', $userList);
     $smarty->assign('welcome', $GLOBALS['mod_strings']['LBL_SYNCP_WELCOME']);
     $smarty->assign('mod', $GLOBALS['mod_strings']);
     $smarty->assign('siteURL', $GLOBALS['sugar_config']['site_url']);
     if (isset($_REQUEST['label'])) {
         $smarty->assign('label', $_REQUEST['label']);
     }
     $options = !empty($GLOBALS['system_config']->settings['system_portal_url']) ? $GLOBALS['system_config']->settings['system_portal_url'] : 'https://';
     $smarty->assign('options', $options);
     $ajax = new AjaxCompose();
     $ajax->addCrumb(translate('LBL_SUGARPORTAL', 'ModuleBuilder'), 'ModuleBuilder.main("sugarportal")');
     $ajax->addCrumb(ucwords(translate('LBL_PORTAL_CONFIGURE')), '');
     $ajax->addSection('center', translate('LBL_SUGARPORTAL', 'ModuleBuilder'), $smarty->fetch('modules/ModuleBuilder/tpls/portalconfig.tpl'));
     $GLOBALS['log']->debug($smarty->fetch('modules/ModuleBuilder/tpls/portalconfig.tpl'));
     echo $ajax->getJavascript();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:48,代码来源:view.portalconfig.php

示例14: display

 /**
  * @see SugarView::display()
  */
 public function display()
 {
     global $mod_strings;
     global $app_list_strings;
     global $app_strings;
     global $current_user;
     echo $this->getModuleTitle(false);
     global $currentModule, $sugar_config;
     $focus = Administration::getSettings();
     //retrieve all admin settings.
     $GLOBALS['log']->info("Mass Emailer(EmailMan) ConfigureSettings view");
     $this->ss->assign("MOD", $mod_strings);
     $this->ss->assign("APP", $app_strings);
     $this->ss->assign("THEME", SugarThemeRegistry::current()->__toString());
     $this->ss->assign("RETURN_MODULE", "Administration");
     $this->ss->assign("RETURN_ACTION", "index");
     $this->ss->assign("MODULE", $currentModule);
     $this->ss->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']);
     if (isset($focus->settings['massemailer_campaign_emails_per_run']) && !empty($focus->settings['massemailer_campaign_emails_per_run'])) {
         $this->ss->assign("EMAILS_PER_RUN", $focus->settings['massemailer_campaign_emails_per_run']);
     } else {
         $this->ss->assign("EMAILS_PER_RUN", 500);
     }
     if (!isset($focus->settings['massemailer_tracking_entities_location_type']) or empty($focus->settings['massemailer_tracking_entities_location_type']) or $focus->settings['massemailer_tracking_entities_location_type'] == '1') {
         $this->ss->assign("default_checked", "checked");
         $this->ss->assign("TRACKING_ENTRIES_LOCATION_STATE", "disabled");
         $this->ss->assign("TRACKING_ENTRIES_LOCATION", $mod_strings['TRACKING_ENTRIES_LOCATION_DEFAULT_VALUE']);
     } else {
         $this->ss->assign("userdefined_checked", "checked");
         $this->ss->assign("TRACKING_ENTRIES_LOCATION", $focus->settings["massemailer_tracking_entities_location"]);
     }
     $this->ss->assign("SITEURL", $sugar_config['site_url']);
     // Change the default campaign to not store a copy of each message.
     if (!empty($focus->settings['massemailer_email_copy']) and $focus->settings['massemailer_email_copy'] == '1') {
         $this->ss->assign("yes_checked", "checked='checked'");
     } else {
         $this->ss->assign("no_checked", "checked='checked'");
     }
     $email = BeanFactory::getBean('Emails');
     $this->ss->assign('ROLLOVER', $email->rolloverStyle);
     $this->ss->assign("JAVASCRIPT", get_validate_record_js());
     $this->ss->display("modules/EmailMan/tpls/campaignconfig.tpl");
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:46,代码来源:view.campaignconfig.php

示例15: display

 /**
  * @see SugarView::display()
  */
 public function display()
 {
     require_once 'modules/Home/UnifiedSearchAdvanced.php';
     $usa = new UnifiedSearchAdvanced();
     global $mod_strings, $app_strings, $app_list_strings, $current_user;
     $sugar_smarty = new Sugar_Smarty();
     $sugar_smarty->assign('APP', $app_strings);
     $sugar_smarty->assign('MOD', $mod_strings);
     $sugar_smarty->assign('moduleTitle', $this->getModuleTitle(false));
     $modules = $usa->retrieveEnabledAndDisabledModules();
     $sugar_smarty->assign('enabled_modules', json_encode($modules['enabled']));
     $sugar_smarty->assign('disabled_modules', json_encode($modules['disabled']));
     $defaultEngine = SugarSearchEngineFactory::getFTSEngineNameFromConfig();
     $config = $GLOBALS['sugar_config']['full_text_engine'][$defaultEngine];
     $justRequestedAScheduledIndex = !empty($_REQUEST['sched']) ? true : false;
     $hide_fts_config = isset($GLOBALS['sugar_config']['hide_full_text_engine_config']) ? $GLOBALS['sugar_config']['hide_full_text_engine_config'] : false;
     $showSchedButton = $defaultEngine != '' && $this->isFTSConnectionValid() ? true : false;
     $sugar_smarty->assign("showSchedButton", $showSchedButton);
     $sugar_smarty->assign("hide_fts_config", $hide_fts_config);
     $sugar_smarty->assign("fts_type", get_select_options_with_id($app_list_strings['fts_type'], $defaultEngine));
     $sugar_smarty->assign("fts_host", $config['host']);
     $sugar_smarty->assign("fts_port", $config['port']);
     $sugar_smarty->assign("fts_scheduled", !empty($schedulerID) && !$schedulerCompleted);
     $sugar_smarty->assign('justRequestedAScheduledIndex', $justRequestedAScheduledIndex);
     //End FTS
     if (is_admin($current_user)) {
         if (!empty($GLOBALS['sugar_config']['fts_disable_notification'])) {
             displayAdminError(translate('LBL_FTS_DISABLED', 'Administration'));
         }
         // if fts indexing is done, show the notification to admin
         $admin = Administration::getSettings();
         if (!empty($admin->settings['info_fts_index_done'])) {
             displayAdminError(translate('LBL_FTS_INDEXING_DONE', 'Administration'));
             // reset flag
             $admin->saveSetting('info', 'fts_index_done', 0);
         }
     }
     echo $sugar_smarty->fetch(SugarAutoLoader::existingCustomOne('modules/Administration/templates/GlobalSearchSettings.tpl'));
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:42,代码来源:view.globalsearchsettings.php


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