From 0079b0683a1b65b63605d92dd0dda37339dba881 Mon Sep 17 00:00:00 2001 From: nathangray Date: Tue, 19 Mar 2019 14:57:25 -0600 Subject: [PATCH] Get changes showing up for admin_cmd_acl --- admin/inc/class.admin_cmd_acl.inc.php | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/admin/inc/class.admin_cmd_acl.inc.php b/admin/inc/class.admin_cmd_acl.inc.php index 8e29105a06..f5e9525942 100644 --- a/admin/inc/class.admin_cmd_acl.inc.php +++ b/admin/inc/class.admin_cmd_acl.inc.php @@ -118,4 +118,36 @@ class admin_cmd_acl extends admin_cmd $location ); } + + /** + * Return (human readable) labels for keys of changes + * + * @return array + */ + function get_change_labels() + { + $labels = parent::get_change_labels(); + $labels[get_class($this)] = lang('ACL'); + return $labels; + } + + + /** + * Return widget types (indexed by field key) for changes + * + * Used by historylog widget to show the changes the command recorded. + */ + function get_change_widgets() + { + $widgets = parent::get_change_widgets(); + // Specify app to get bitwise permissions, since it's not always admin + $widgets[get_class($this)] = 'select-bitwise'; + + // Get select options for this app, slide them in via modifications + // since historylog doesn't do attributes on value widgets + Api\Etemplate::setElementAttribute('history['.get_class($this).']', 'select_options', + Api\Etemplate\Widget\Select::typeOptions('select-bitwise', ','.$this->app) + ); + return $widgets; + } }