<?php
if (isset($_REQUEST['selectedGroup'])) {
$selectedGroup = intval($_REQUEST['selectedGroup']);
$groupName = htmlentities($bugDatabase->lists['group'][$selectedGroup]['name']);
}
if (isset($mod)) {
$row = 0;
$update = array();
while (list($key, $value) = each($mod)) {
// Comma seperate your arrays, son.
if (is_array($value))
$value = implode(",", $value);
$update[0]['modify'][$row]['fieldName'] = $key;
$update[0]['modify'][$row]['fieldValue'] = $bugDatabase->db->qstr($value);
$row ++;
}
if ($row) {
// Now we assemble the DB info...
$update[0]['tableName'] = "groups";
$update[0]['action'] = "change";
$update[0]['uniqueRow'] = "gid";
$update[0]['rowid'] = $selectedGroup;
$bugDatabase->alterDb($update);
unset($selectedGroup);
header("Location: {$options['baseURL']}?area=admin&action=gedit");
}
}
?>