MasterEvent->getEventParam('skip_site_config') ) { return ; } if (!isset($this->_helper)) { $this->_helper = $this->Application->recallObject('SiteConfigHelper'); } $prefix_file = basename( $this->Application->UnitConfigReader->getPrefixFile($event->MasterEvent->Prefix) ); $cut_pos = strrpos($prefix_file, '_config.php'); $prefix_file = substr($prefix_file, 0, $cut_pos) . '_' . $event->MasterEvent->Prefix . '.php'; if (file_exists(SYSTEM_PRESET_PATH . DIRECTORY_SEPARATOR . $prefix_file)) { if ( $this->Application->getUnitOption($event->MasterEvent->Prefix, 'SiteConfigProcessed') ) { // don't apply same site config twice during installation return ; } require SYSTEM_PRESET_PATH . DIRECTORY_SEPARATOR . $prefix_file; } else { return ; } $change_names = Array ( 'remove_sections', 'debug_only_sections', 'remove_buttons', 'hidden_fields', 'virtual_hidden_fields', 'debug_only_fields', 'debug_only_virtual_fields', 'required_fields', 'virtual_required_fields', 'hide_edit_tabs', 'hide_columns' ); $changes = Array (); foreach ($change_names as $change_name) { if (isset($$change_name)) { $changes[$change_name] = $$change_name; } } // apply changes $this->_helper->processConfigChanges($event->MasterEvent->Prefix, $changes); $this->Application->setUnitOption($event->MasterEvent->Prefix, 'SiteConfigProcessed', true); } }