Change group_unchanged to group_protected to be consistent with the rest of the project and the name used in the gui.
This commit is contained in:
parent
1ebe3cd1f9
commit
d3122cd83a
|
|
@ -276,16 +276,14 @@
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||||
$z++;
|
$z++;
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'group_protected';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||||
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'group_description';
|
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'group_description';
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'groupdesc';
|
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'groupdesc';
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||||
$z++;
|
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'group_unchanged';
|
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'groupdesc';
|
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
|
||||||
|
|
||||||
|
|
||||||
$y = 2; //table array index
|
$y = 2; //table array index
|
||||||
$z = 0; //field array index
|
$z = 0; //field array index
|
||||||
|
|
|
||||||
|
|
@ -45,21 +45,18 @@ else {
|
||||||
//show the header
|
//show the header
|
||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
$page["title"] = $text['title-group_manager'];
|
$page["title"] = $text['title-group_manager'];
|
||||||
|
|
||||||
if (isset($_REQUEST["change"])) {
|
if (isset($_REQUEST["change"])) {
|
||||||
//get the values from the HTTP POST and save them as PHP variables
|
//get the values from the HTTP POST and save them as PHP variables
|
||||||
$change = check_str($_REQUEST["change"]);
|
$change = check_str($_REQUEST["change"]);
|
||||||
$group_name = check_str($_REQUEST["group_name"]);
|
$group_name = check_str($_REQUEST["group_name"]);
|
||||||
|
|
||||||
$sql = "update v_groups set ";
|
$sql = "update v_groups set ";
|
||||||
$sql .= "group_unchanged = '$change' ";
|
$sql .= "group_protected = '$change' ";
|
||||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||||
$sql .= "and group_name = '$group_name' ";
|
$sql .= "and group_name = '$group_name' ";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//show the content
|
//show the content
|
||||||
echo "<div class='' style='padding:0px;'>\n";
|
echo "<div class='' style='padding:0px;'>\n";
|
||||||
|
|
@ -102,7 +99,7 @@ else {
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
$group_name = $row["group_name"];
|
$group_name = $row["group_name"];
|
||||||
$group_unchanged= $row["group_unchanged"];
|
$group_protected= $row["group_protected"];
|
||||||
$group_uuid = $row["group_uuid"];
|
$group_uuid = $row["group_uuid"];
|
||||||
$group_description = $row["group_description"];
|
$group_description = $row["group_description"];
|
||||||
if (strlen($group_name) == 0) { $group_name = " "; }
|
if (strlen($group_name) == 0) { $group_name = " "; }
|
||||||
|
|
@ -115,13 +112,13 @@ else {
|
||||||
else {
|
else {
|
||||||
$strlist .= "<tr>";
|
$strlist .= "<tr>";
|
||||||
$strlist .= "<td class='".$row_style[$c]."' align=\"left\" class='' nowrap> $group_name </td>\n";
|
$strlist .= "<td class='".$row_style[$c]."' align=\"left\" class='' nowrap> $group_name </td>\n";
|
||||||
//$strlist .= "<td class='".$row_style[$c]."' align=\"left\" class='' nowrap> $group_unchanged </td>\n";
|
//$strlist .= "<td class='".$row_style[$c]."' align=\"left\" class='' nowrap> $group_protected </td>\n";
|
||||||
$strlist .= " <td class='".$row_style[$c]."' align=\"left\" nowrap='nowrap' nowrap>\n";
|
$strlist .= " <td class='".$row_style[$c]."' align=\"left\" nowrap='nowrap' nowrap>\n";
|
||||||
if ($group_unchanged == "true") {
|
if ($group_protected == "true") {
|
||||||
$strlist .= " <input type='checkbox' name='group_unchanged' checked='checked' value='true' onchange=\"window.location='".PROJECT_PATH."/core/users/groups.php?change=false&group_name=".$group_name."';\">\n";
|
$strlist .= " <input type='checkbox' name='group_protected' checked='checked' value='true' onchange=\"window.location='".PROJECT_PATH."/core/users/groups.php?change=false&group_name=".$group_name."';\">\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$strlist .= " <input type='checkbox' name='group_unchanged' value='false' onchange=\"window.location='".PROJECT_PATH."/core/users/groups.php?change=true&group_name=".$group_name."';\">\n";
|
$strlist .= " <input type='checkbox' name='group_protected' value='false' onchange=\"window.location='".PROJECT_PATH."/core/users/groups.php?change=true&group_name=".$group_name."';\">\n";
|
||||||
}
|
}
|
||||||
$strlist .= " </td>\n";
|
$strlist .= " </td>\n";
|
||||||
$strlist .= "<td class='".$row_style[$c]."' align=\"left\" class='' nowrap> $group_description </td>\n";
|
$strlist .= "<td class='".$row_style[$c]."' align=\"left\" class='' nowrap> $group_description </td>\n";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue