From 0670e247e9546b38ef376f19bc7d84cbe621f871 Mon Sep 17 00:00:00 2001 From: Christian Binder Date: Wed, 19 Jan 2011 16:36:13 +0000 Subject: [PATCH] changed retrieving of pm_id and pe_id to etemplate_request::read() (thanks Ralf) - added tiny method to check for global eroles - prevent displaying global eroles in etemplate editor --- etemplate/inc/class.select_widget.inc.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/etemplate/inc/class.select_widget.inc.php b/etemplate/inc/class.select_widget.inc.php index 6e59eacf8e..2630b30e7e 100644 --- a/etemplate/inc/class.select_widget.inc.php +++ b/etemplate/inc/class.select_widget.inc.php @@ -234,7 +234,7 @@ class select_widget { if ($id && ($name = $eroles->id2title($id))) { - $cell['sel_options'][$id] = $name; + $cell['sel_options'][$id] = $name.($eroles->is_global($id) ? ' ('.lang('Global').')' : ''); } else { @@ -247,9 +247,8 @@ class select_widget foreach($eroles->get_free_eroles() as $id => $data) { - $global = $data['pm_id'] == 0 ? ' ('.lang('Global').')' : ''; $cell['sel_options'][$data['role_id']] = array( - 'label' => $data['role_title'] . $global, + 'label' => $data['role_title'].($eroles->is_global($data['role_id']) ? ' ('.lang('Global').')' : ''), 'title' => $data['role_description'], ); }