mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-06 13:34:56 +02:00
2011-02-28 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_db.php: cleaned source code, and erased the deprecated function "dame_id_grupo". *extensions/update_manager.php, operation/agentes/export_csv.php, godmode/agentes/module_manager.php, godmode/agentes/modificar_agente.php, godmode/agentes/configurar_agente.php: replaced obsolete "dame_id_grupo" to "get_agent_group". git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4027 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
9b0eaa62c4
commit
98645e4f69
@ -1,3 +1,12 @@
|
||||
2011-02-28 Miguel de Dios <miguel.dedios@artica.es>
|
||||
* include/functions_db.php: cleaned source code, and erased the deprecated
|
||||
function "dame_id_grupo".
|
||||
|
||||
*extensions/update_manager.php, operation/agentes/export_csv.php,
|
||||
godmode/agentes/module_manager.php, godmode/agentes/modificar_agente.php,
|
||||
godmode/agentes/configurar_agente.php: replaced obsolete "dame_id_grupo" to
|
||||
"get_agent_group".
|
||||
|
||||
2011-02-28 Miguel de Dios <miguel.dedios@artica.es>
|
||||
* extensions/update_manager.php: replaced obsolete "give_acl" to "check_acl"
|
||||
and erased the "give_acl".
|
||||
|
@ -69,7 +69,7 @@ function pandora_update_manager_main () {
|
||||
global $config;
|
||||
global $db;
|
||||
|
||||
if (! give_acl ($config['id_user'], 0, "PM")) {
|
||||
if (! check_acl($config['id_user'], 0, "PM")) {
|
||||
require ("general/noaccess.php");
|
||||
return;
|
||||
}
|
||||
@ -124,7 +124,7 @@ function pandora_update_manager_godmode () {
|
||||
}
|
||||
|
||||
if(isset($config['id_user'])) {
|
||||
if (give_acl ($config['id_user'], 0, "PM")) {
|
||||
if (check_acl($config['id_user'], 0, "PM")) {
|
||||
add_operation_menu_option (__('Update manager'));
|
||||
add_godmode_menu_option (__('Update manager settings'), 'PM','gsetup');
|
||||
add_extension_main_function ('pandora_update_manager_main');
|
||||
|
@ -750,7 +750,7 @@ if ($create_module) {
|
||||
if ($delete_module) { // DELETE agent module !
|
||||
$id_borrar_modulo = (int) get_parameter_get ("delete_module",0);
|
||||
$module_data = get_db_row ('tagente_modulo', 'id_agente_modulo', $id_borrar_modulo);
|
||||
$id_grupo = (int) dame_id_grupo ($id_agente);
|
||||
$id_grupo = (int) get_agent_group($id_agente);
|
||||
|
||||
if (! check_acl ($config["id_user"], $id_grupo, "AW")) {
|
||||
pandora_audit("ACL Violation",
|
||||
|
@ -45,7 +45,7 @@ $agent_to_delete = (int)get_parameter('borrar_agente');
|
||||
if (!empty($agent_to_delete)) {
|
||||
$id_agente = $agent_to_delete;
|
||||
$agent_name = get_agent_name ($id_agente);
|
||||
$id_grupo = dame_id_grupo ($id_agente);
|
||||
$id_grupo = get_agent_group($id_agente);
|
||||
if (check_acl ($config["id_user"], $id_grupo, "AW")==1) {
|
||||
$id_agentes[0] = $id_agente;
|
||||
delete_agent($id_agentes);
|
||||
|
@ -81,7 +81,7 @@ if ($multiple_delete) {
|
||||
$id_agent_modules_delete = (array)get_parameter('id_delete');
|
||||
|
||||
foreach($id_agent_modules_delete as $id_agent_module_del) {
|
||||
$id_grupo = (int) dame_id_grupo ($id_agente);
|
||||
$id_grupo = (int) get_agent_group($id_agente);
|
||||
|
||||
if (! check_acl ($config["id_user"], $id_grupo, "AW")) {
|
||||
pandora_audit("ACL Violation",
|
||||
|
@ -314,7 +314,8 @@ function safe_acl_group ($id_user, $id_groups, $access) {
|
||||
if ($id_groups == 0)
|
||||
return array_keys (get_user_groups ($id_user, $access));
|
||||
return array ($id_groups);
|
||||
} elseif (!is_array ($id_groups)) {
|
||||
}
|
||||
elseif (!is_array ($id_groups)) {
|
||||
return array ();
|
||||
}
|
||||
|
||||
@ -1426,7 +1427,8 @@ function get_moduletypes ($type = "all", $rows = "nombre") {
|
||||
$row_cnt = count ($rows);
|
||||
if ($type == "remote") {
|
||||
return array_merge (range (6,18), (array) 100);
|
||||
} elseif ($type == "agent") {
|
||||
}
|
||||
elseif ($type == "agent") {
|
||||
return array_merge (range (1,4), range (19,24));
|
||||
}
|
||||
|
||||
@ -1439,7 +1441,8 @@ function get_moduletypes ($type = "all", $rows = "nombre") {
|
||||
foreach ($result as $type) {
|
||||
if ($row_cnt > 1) {
|
||||
$return[$type["id_tipo"]] = $type;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$return[$type["id_tipo"]] = $type[reset ($rows)];
|
||||
}
|
||||
}
|
||||
@ -1447,14 +1450,6 @@ function get_moduletypes ($type = "all", $rows = "nombre") {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated Use get_agent_group ($id) now (fully compatible)
|
||||
*/
|
||||
function dame_id_grupo ($id_agent) {
|
||||
return get_agent_group ($id_agent);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the number of pandora data packets in the database.
|
||||
*
|
||||
|
@ -29,7 +29,7 @@ if (isset ($_GET["agentmodule"]) && isset ($_GET["agent"]) ){
|
||||
$id_agentmodule = $_GET["agentmodule"];
|
||||
$id_agent = $_GET["agent"];
|
||||
$agentmodule_name = get_agentmodule_name ($id_agentmodule);
|
||||
if (! check_acl ($config['id_user'], dame_id_grupo ($id_agent), "AR")) {
|
||||
if (! check_acl ($config['id_user'], get_agent_group($id_agent), "AR")) {
|
||||
pandora_audit("ACL Violation",
|
||||
"Trying to access Agent Export Data");
|
||||
require ("../../general/noaccess.php");
|
||||
|
Loading…
x
Reference in New Issue
Block a user