/** * @see SugarView::process() */ public function process() { $this->options['show_all'] = false; $this->options['show_javascript'] = true; $this->options['show_footer'] = false; $this->options['show_header'] = false; parent::process(); }
function process() { parent::process(); }
/** * @see SugarView::process() */ public function process() { //Load Sources Here... if (!empty($_REQUEST['merge_module'])) { $this->_merge_module = $_REQUEST['merge_module']; } else { //Error } $moduleError = false; require_once 'include/connectors/utils/ConnectorUtils.php'; require_once 'include/connectors/sources/SourceFactory.php'; $modules_sources = ConnectorUtils::getDisplayConfig(); if (empty($modules_sources)) { $moduleError = true; } else { $this->_modules_sources = $modules_sources; if (empty($this->_modules_sources[$this->_merge_module]) || empty($this->_modules_sources[$this->_merge_module])) { $moduleError = true; } } if ($moduleError) { $GLOBALS['log']->error($GLOBALS['mod_strings']['ERROR_NO_CONNECTOR_DISPLAY_CONFIG_FILE']); echo $GLOBALS['mod_strings']['ERROR_NO_CONNECTOR_DISPLAY_CONFIG_FILE']; return; } $_SESSION['merge_module'] = $this->_merge_module; $this->seed = BeanFactory::getBean($this->_merge_module, $_REQUEST['record']); //search form $searchdefs = ConnectorUtils::getSearchDefs(); $this->_searchDefs = isset($searchdefs) ? $searchdefs : array(); $mapped_fields = array(); unset($_SESSION['searchDefs'][$this->_merge_module][$this->seed->id]); $sources = $modules_sources[$this->_merge_module]; $source = array_shift($sources); foreach ($sources as $lsource) { if (!empty($this->_searchDefs[$lsource][$this->_merge_module])) { $s = ConnectorFactory::getInstance($lsource); if ($s->getSource()->isEnabledInWizard()) { $source_map = $s->getModuleMapping($this->_merge_module); foreach ($this->_searchDefs[$lsource][$this->_merge_module] as $key) { $beanKey = $key; if (!empty($source_map[$key])) { $beanKey = $source_map[$key]; } if (!empty($this->seed->{$beanKey})) { $val = $this->seed->{$beanKey}; if (is_object($val) && get_class($val) == 'SugarEmailAddress') { $emailaddress = ''; if (!empty($val->addresses)) { foreach ($val->addresses as $email) { if (!empty($email['primary_address'])) { $emailaddress = $email['email_address']; break; } } } $val = $emailaddress; } } else { $val = ''; } $_SESSION['searchDefs'][$this->_merge_module][$this->seed->id][$lsource][$key] = $val; } //foreach } } //if } //end search form parent::process(); }