From 9bcedcc84ec36bb56de32d93307a16d3d5897c95 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Fri, 27 Sep 2013 09:37:59 +0000 Subject: [PATCH] Change group_unchanged to group_protected to be consistent with the rest of the project and the name used in the gui. --- core/users/app_config.php | 10 ++++------ core/users/groups.php | 15 ++++++--------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/core/users/app_config.php b/core/users/app_config.php index 6593d56f3c..8d3cb9ce48 100644 --- a/core/users/app_config.php +++ b/core/users/app_config.php @@ -276,16 +276,14 @@ $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'] = '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']['deprecated'] = 'groupdesc'; $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_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 $z = 0; //field array index diff --git a/core/users/groups.php b/core/users/groups.php index 1011bd7408..ebdff5fbfe 100644 --- a/core/users/groups.php +++ b/core/users/groups.php @@ -45,21 +45,18 @@ else { //show the header require_once "resources/header.php"; $page["title"] = $text['title-group_manager']; - if (isset($_REQUEST["change"])) { //get the values from the HTTP POST and save them as PHP variables $change = check_str($_REQUEST["change"]); $group_name = check_str($_REQUEST["group_name"]); $sql = "update v_groups set "; - $sql .= "group_unchanged = '$change' "; + $sql .= "group_protected = '$change' "; $sql .= "where domain_uuid = '$domain_uuid' "; $sql .= "and group_name = '$group_name' "; $db->exec(check_sql($sql)); unset($sql); } - - //show the content echo "
\n"; @@ -102,7 +99,7 @@ else { $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); foreach ($result as &$row) { $group_name = $row["group_name"]; - $group_unchanged= $row["group_unchanged"]; + $group_protected= $row["group_protected"]; $group_uuid = $row["group_uuid"]; $group_description = $row["group_description"]; if (strlen($group_name) == 0) { $group_name = " "; } @@ -115,13 +112,13 @@ else { else { $strlist .= ""; $strlist .= "   $group_name   \n"; - //$strlist .= "   $group_unchanged   \n"; + //$strlist .= "   $group_protected   \n"; $strlist .= " \n"; - if ($group_unchanged == "true") { - $strlist .= " \n"; + if ($group_protected == "true") { + $strlist .= " \n"; } else { - $strlist .= " \n"; + $strlist .= " \n"; } $strlist .= " \n"; $strlist .= "   $group_description   \n";