admin_groups minor cleanup
This commit is contained in:
parent
5113776a42
commit
93dd7113b1
|
@ -7,15 +7,23 @@ function admin_groups() {
|
||||||
if (!isset ($_REQUEST["action"])) {
|
if (!isset ($_REQUEST["action"])) {
|
||||||
$groups_html = "";
|
$groups_html = "";
|
||||||
foreach ($groups as $group) {
|
foreach ($groups as $group) {
|
||||||
$groups_html .= '<tr>';
|
$groups_html .= sprintf(
|
||||||
$groups_html .= '<td>' . $group['Name'] . '</td>';
|
'<tr><td>%s</td>',
|
||||||
|
$group['Name']
|
||||||
|
);
|
||||||
$privileges = sql_select("SELECT * FROM `GroupPrivileges` JOIN `Privileges` ON (`GroupPrivileges`.`privilege_id` = `Privileges`.`id`) WHERE `group_id`=" . sql_escape($group['UID']));
|
$privileges = sql_select("SELECT * FROM `GroupPrivileges` JOIN `Privileges` ON (`GroupPrivileges`.`privilege_id` = `Privileges`.`id`) WHERE `group_id`=" . sql_escape($group['UID']));
|
||||||
$privileges_html = array ();
|
$privileges_html = array ();
|
||||||
|
|
||||||
foreach ($privileges as $priv)
|
foreach ($privileges as $priv)
|
||||||
$privileges_html[] = $priv['name'];
|
$privileges_html[] = $priv['name'];
|
||||||
$groups_html .= '<td>' . join(", ", $privileges_html) . '</td>';
|
|
||||||
$groups_html .= '<td><a href="' . page_link_to("admin_groups") . '&action=edit&id=' . $group['UID'] . '">Ändern</a></td>';
|
$groups_html .= sprintf(
|
||||||
$groups_html .= '</tr>';
|
'<td>%s</td>'
|
||||||
|
. '<td><a href="%s&action=edit&id=%s">Ändern</a></td>',
|
||||||
|
join(', ', $privileges_html),
|
||||||
|
page_link_to("admin_groups"),
|
||||||
|
$group['UID']
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return template_render('../templates/admin_groups.html', array (
|
return template_render('../templates/admin_groups.html', array (
|
||||||
|
|
Loading…
Reference in New Issue