mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
update
This commit is contained in:
parent
ef22945b80
commit
57f6ad097a
@ -385,13 +385,28 @@ function html_print_select_groups($id_user = false, $privilege = "AR",
|
|||||||
$nothing = '', $nothing_value = 0, $return = false,
|
$nothing = '', $nothing_value = 0, $return = false,
|
||||||
$multiple = false, $sort = true, $class = '', $disabled = false,
|
$multiple = false, $sort = true, $class = '', $disabled = false,
|
||||||
$style = false, $option_style = false, $id_group = false,
|
$style = false, $option_style = false, $id_group = false,
|
||||||
$keys_field = 'id_grupo', $strict_user = false) {
|
$keys_field = 'id_grupo', $strict_user = false, $delete_groups = false , $include_groups = false) {
|
||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$fields = users_get_groups_for_select($id_user, $privilege,
|
$fields = users_get_groups_for_select($id_user, $privilege,
|
||||||
$returnAllGroup, true, $id_group, $keys_field);
|
$returnAllGroup, true, $id_group, $keys_field);
|
||||||
|
|
||||||
|
if ($delete_groups && is_array($delete_groups)){
|
||||||
|
foreach ($delete_groups as $value) {
|
||||||
|
unset($fields[$value]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_array($include_groups)){
|
||||||
|
|
||||||
|
$field = array();
|
||||||
|
foreach ($include_groups as $value) {
|
||||||
|
$field[$value] = $fields[$value];
|
||||||
|
}
|
||||||
|
$fields = $field;
|
||||||
|
}
|
||||||
|
|
||||||
if ($strict_user) {
|
if ($strict_user) {
|
||||||
$fields = users_get_strict_mode_groups($config['id_user'], $returnAllGroup);
|
$fields = users_get_strict_mode_groups($config['id_user'], $returnAllGroup);
|
||||||
}
|
}
|
||||||
|
@ -2167,6 +2167,20 @@ CREATE TABLE IF NOT EXISTS `tpolicy_agents` (
|
|||||||
UNIQUE (`id_policy`, `id_agent`)
|
UNIQUE (`id_policy`, `id_agent`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
-- Table `tpolicy_groups`
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
CREATE TABLE IF NOT EXISTS `tpolicy_groups` (
|
||||||
|
`id` int(10) unsigned NOT NULL auto_increment,
|
||||||
|
`id_policy` int(10) unsigned default '0',
|
||||||
|
`id_group` int(10) unsigned default '0',
|
||||||
|
`policy_applied` tinyint(1) unsigned default '0',
|
||||||
|
`pending_delete` tinyint(1) unsigned default '0',
|
||||||
|
`last_apply_utimestamp` int(10) unsigned NOT NULL default 0,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
UNIQUE (`id_policy`, `id_group`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
-- Table `tdashboard`
|
-- Table `tdashboard`
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
@ -2468,6 +2482,7 @@ CREATE TABLE IF NOT EXISTS `tpolicy_queue` (
|
|||||||
`id` int(10) unsigned NOT NULL auto_increment,
|
`id` int(10) unsigned NOT NULL auto_increment,
|
||||||
`id_policy` int(10) unsigned NOT NULL default '0',
|
`id_policy` int(10) unsigned NOT NULL default '0',
|
||||||
`id_agent` int(10) unsigned NOT NULL default '0',
|
`id_agent` int(10) unsigned NOT NULL default '0',
|
||||||
|
`id_group` int(10) unsigned NOT NULL default '0',
|
||||||
`operation` varchar(15) default '',
|
`operation` varchar(15) default '',
|
||||||
`progress` int(10) unsigned NOT NULL default '0',
|
`progress` int(10) unsigned NOT NULL default '0',
|
||||||
`end_utimestamp` int(10) unsigned NOT NULL default 0,
|
`end_utimestamp` int(10) unsigned NOT NULL default 0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user