From 1b64ccc99628fa9f2824242138ada950e1d6b2a1 Mon Sep 17 00:00:00 2001 From: nathangray Date: Tue, 31 Oct 2017 11:22:47 -0600 Subject: [PATCH] Admin ACL export - Suppress 'All customfields' field, it's not applicable - Add default definition --- .../class.admin_wizard_export_acl_csv.inc.php | 18 +++++++++ admin/setup/importexport_default.xml | 38 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 admin/setup/importexport_default.xml diff --git a/admin/inc/class.admin_wizard_export_acl_csv.inc.php b/admin/inc/class.admin_wizard_export_acl_csv.inc.php index ad125f23bf..5b963e74cb 100644 --- a/admin/inc/class.admin_wizard_export_acl_csv.inc.php +++ b/admin/inc/class.admin_wizard_export_acl_csv.inc.php @@ -36,4 +36,22 @@ class admin_wizard_export_acl_csv extends importexport_wizard_basic_export_csv // Custom fields - not possible for ACL unset($this->export_fields['customfields']); } + + /** + * Choose fields to export - overridden from parent to remove 'All custom fields', + * which does not apply here + */ + function wizard_step30(&$content, &$sel_options, &$readonlys, &$preserv) + { + $result = parent::wizard_step30($content, $sel_options, $readonlys, $preserv); + unset($this->export_fields['all_custom_fields']); + foreach($content['fields'] as $field_id => $field) + { + if($field['field'] == 'all_custom_fields') + { + unset($content['fields'][$field_id]); + } + } + return $result; + } } diff --git a/admin/setup/importexport_default.xml b/admin/setup/importexport_default.xml new file mode 100644 index 0000000000..c3b7558bc3 --- /dev/null +++ b/admin/setup/importexport_default.xml @@ -0,0 +1,38 @@ + + + + importexport definitions + utf-8 + 1 + + + + export-ACL + admin + admin_export_acl_csv + export + + + + acl_account + acl_appname + acl_location + acl1 + acl2 + acl4 + acl8 + acl16 + acl64 + acl128 + acl256 + + ; + utf-8 + label + 1 + + 2017-10-31 11:20:14 + + + +