* these Appropriate Legal Notices must retain the display of the "Powered by * SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not * reasonably feasible for technical reasons, the Appropriate Legal Notices must * display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM". ********************************************************************************/ global $theme; global $mod_strings; global $app_list_strings; global $current_user; $focus = new InboundEmail(); $focus->checkImap(); /////////////////////////////////////////////////////////////////////////////// //// I-E SYSTEM SETTINGS //// handle saving settings if (isset($_REQUEST['save']) && $_REQUEST['save'] == 'true') { $focus->saveInboundEmailSystemSettings('Case', $_REQUEST['inbound_email_case_macro']); } //// END I-E SYSTEM SETTINGS /////////////////////////////////////////////////////////////////////////////// if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) { $ListView->setHeaderText("<a href='index.php?action=index&module=DynamicLayout&from_action=ListView&from_module=" . $_REQUEST['module'] . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' align='bottom'", null, null, '.gif', $mod_strings['LBL_EDIT_LAYOUT']) . "</a>"); } $where = ''; $limit = '0'; $orderBy = 'date_entered'; $varName = $focus->object_name; $allowByOverride = true; $listView = new ListView(); $listView->initNewXTemplate('modules/InboundEmail/ListView.html', $mod_strings); $listView->setHeaderTitle($mod_strings['LBL_MODULE_TITLE']); echo $focus->getSystemSettingsForm();
public function testsaveInboundEmailSystemSettings() { global $sugar_config, $db; //unset and reconnect Db to resolve mysqli fetch exeception unset($db->database); $db->checkConnection(); $inboundEmail = new InboundEmail(); //execute the method to save the setting $inboundEmail->saveInboundEmailSystemSettings('test', 'test_macro'); //verify the key created $this->assertEquals('test_macro', $sugar_config['inbound_email_test_subject_macro']); }