Index: branches/RC/core/units/admin/admin_events_handler.php =================================================================== diff -u -r9643 -r9835 --- branches/RC/core/units/admin/admin_events_handler.php (.../admin_events_handler.php) (revision 9643) +++ branches/RC/core/units/admin/admin_events_handler.php (.../admin_events_handler.php) (revision 9835) @@ -273,7 +273,7 @@ { $export_helper =& $this->Application->recallObject('CSVHelper'); /* @var $export_helper kCSVHelper */ - + $prefix_special = $this->Application->GetVar('PrefixSpecial'); if(!$prefix_special) { $prefix_special = $export_helper->ExportData('prefix'); @@ -283,7 +283,7 @@ if(!$this->Application->CheckPermission($perm_sections['main'].'.view')) { $this->Application->Redirect('no_permission'); } - + $export_helper->PrefixSpecial = $prefix_special; $export_helper->grid = $this->Application->GetVar('grid'); $export_helper->ExportStep(); @@ -299,15 +299,15 @@ { $export_helper =& $this->Application->recallObject('CSVHelper'); /* @var $export_helper kCSVHelper */ - + $prefix_special = $export_helper->ExportData('prefix'); $prefix_elems = split('\.|_', $prefix_special, 2); $perm_sections = $this->Application->getUnitOption($prefix_elems[0], 'PermSection'); - + if(!$this->Application->CheckPermission($perm_sections['main'].'.view')) { $this->Application->Redirect('no_permission'); } - + $export_helper->GetCSV(); } @@ -321,11 +321,11 @@ $prefix_special = $this->Application->GetVar('PrefixSpecial'); $prefix_elems = split('\.|_', $prefix_special, 2); $perm_sections = $this->Application->getUnitOption($prefix_elems[0], 'PermSection'); - + if(!$this->Application->CheckPermission($perm_sections['main'].'.add') && !$this->Application->CheckPermission($perm_sections['main'].'.edit')) { $this->Application->Redirect('no_permission'); } - + $object =& $event->getObject( Array('skip_autoload' => true) ); /* @var $object kDBItem */ $items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) ); @@ -362,25 +362,45 @@ { $import_helper =& $this->Application->recallObject('CSVHelper'); /* @var $export_helper kCSVHelper */ - + $prefix_special = $import_helper->ImportData('prefix'); $prefix_elems = split('\.|_', $prefix_special, 2); $perm_sections = $this->Application->getUnitOption($prefix_elems[0], 'PermSection'); if(!$this->Application->CheckPermission($perm_sections['main'].'.add') && !$this->Application->CheckPermission($perm_sections['main'].'.edit')) { $this->Application->Redirect('no_permission'); } - + $import_helper->ImportStep(); $event->status = erSTOP; - } + } + /** + * Shows unit config filename, where requested prefix is defined + * + * @param kEvent $event + */ function OnCheckPrefixConfig(&$event) { $prefix = $this->Application->GetVar('config_prefix'); - $cfg =& $this->Application->recallObject('kConfigReflection'); - /* @var $cfg kConfigReflection */ - $cfg->LoadConfig($prefix); - $event->redirect = false; + $config_file = $this->Application->UnitConfigReader->prefixFiles[$prefix]; + + ob_start(); + ?> + + + Unit Config of "<?php echo $prefix; ?>" prefix + + + Close Window

+ Prefix:
+ Unit Config: highlightString($config_file); ?>
+
Close Window
+ + + status = erSTOP; } function OnUploadFile(&$event) @@ -405,7 +425,7 @@ else {*/ $section = $event->getSection(); /*}*/ - + if ($this->Application->GetVar('t') != 'import/import_start' && !$perm_helper->CheckUserPermission($user, $section.'.add') && !$perm_helper->CheckUserPermission($user, $section.'.edit')) { $event->status = erPERM_FAIL; header('HTTP/1.0 403 You don\'t have permissions to upload'); Index: branches/RC/core/admin_templates/tools/system_tools.tpl =================================================================== diff -u -r9639 -r9835 --- branches/RC/core/admin_templates/tools/system_tools.tpl (.../system_tools.tpl) (revision 9639) +++ branches/RC/core/admin_templates/tools/system_tools.tpl (.../system_tools.tpl) (revision 9835) @@ -57,29 +57,28 @@ + "> - Prefix: + Table Structure: - - - Unit config prefix + + + table name (prefix optional) OR unit config prefix - - "> - Table Structure: + Prefix: - - - table name (prefix optional) OR unit config prefix + + + Unit config prefix