|
@@ 97-105 (lines=9) @@
|
| 94 |
|
$changes = array(); |
| 95 |
|
$current_group_role_array = array(); |
| 96 |
|
$proposed_group_role_array = array(); |
| 97 |
|
foreach ($proposed_group_value as $single_group_info) { |
| 98 |
|
foreach ($single_group_info["roles"] as $single_role_id) { |
| 99 |
|
$tmp_array = array( |
| 100 |
|
"group_id" => $single_group_info["group_id"] |
| 101 |
|
,"role_id" => $single_role_id |
| 102 |
|
); |
| 103 |
|
$proposed_group_role_array[] = json_encode($tmp_array); |
| 104 |
|
} |
| 105 |
|
} |
| 106 |
|
|
| 107 |
|
if(is_array($current_group_values) && !empty($current_group_values)) { |
| 108 |
|
foreach ($current_group_values as $single_group_info) { |
|
@@ 108-116 (lines=9) @@
|
| 105 |
|
} |
| 106 |
|
|
| 107 |
|
if(is_array($current_group_values) && !empty($current_group_values)) { |
| 108 |
|
foreach ($current_group_values as $single_group_info) { |
| 109 |
|
foreach ($single_group_info["roles"] as $single_role_id) { |
| 110 |
|
$tmp_array = array( |
| 111 |
|
"group_id" => $single_group_info["group_id"] |
| 112 |
|
,"role_id" => $single_role_id |
| 113 |
|
); |
| 114 |
|
$current_group_role_array[] = json_encode($tmp_array); |
| 115 |
|
} |
| 116 |
|
} |
| 117 |
|
} |
| 118 |
|
$changes = array_diff($proposed_group_role_array, $current_group_role_array); |
| 119 |
|
$changes = array_merge($changes, array_diff($current_group_role_array, $proposed_group_role_array)); |