summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-06-03 11:17:09 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-06-03 11:17:09 +0200
commit93dd7113b13b06de1701b216b77bb73e76421fb5 (patch)
tree8ff60a11754511cf06d157aa5f9abe73a1412235 /includes
parent5113776a42d0bc7ff8ed2db8619045d3ffb164a9 (diff)
admin_groups minor cleanup
Diffstat (limited to 'includes')
-rw-r--r--includes/pages/admin_groups.php18
1 files changed, 13 insertions, 5 deletions
diff --git a/includes/pages/admin_groups.php b/includes/pages/admin_groups.php
index 5d9d8180..842640d8 100644
--- a/includes/pages/admin_groups.php
+++ b/includes/pages/admin_groups.php
@@ -7,15 +7,23 @@ function admin_groups() {
if (!isset ($_REQUEST["action"])) {
$groups_html = "";
foreach ($groups as $group) {
- $groups_html .= '<tr>';
- $groups_html .= '<td>' . $group['Name'] . '</td>';
+ $groups_html .= sprintf(
+ '<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_html = array ();
+
foreach ($privileges as $priv)
$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 .= '</tr>';
+
+ $groups_html .= sprintf(
+ '<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 (