2010-10-21 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_config.php: fixed the change the flag tconfig "can_block_policies", now the operation is between policy semaphore. Fixes: #3091940 * include/functions_db.php: fixed the save user IP when the $config don't load this var yet. * include/functions_networkmap.php: fixed the translation call function when the pandora don't load the function. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3444 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
e1c7c0d2ef
commit
421e51537c
|
@ -1,3 +1,16 @@
|
||||||
|
2010-10-21 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* include/functions_config.php: fixed the change the flag tconfig
|
||||||
|
"can_block_policies", now the operation is between policy semaphore.
|
||||||
|
|
||||||
|
Fixes: #3091940
|
||||||
|
|
||||||
|
* include/functions_db.php: fixed the save user IP when the $config don't
|
||||||
|
load this var yet.
|
||||||
|
|
||||||
|
* include/functions_networkmap.php: fixed the translation call function when
|
||||||
|
the pandora don't load the function.
|
||||||
|
|
||||||
2010-10-21 Miguel de Dios <miguel.dedios@artica.es>
|
2010-10-21 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* include/functions_config.php: added check tconfig parameter
|
* include/functions_config.php: added check tconfig parameter
|
||||||
|
|
|
@ -220,7 +220,25 @@ function update_config () {
|
||||||
update_config_value ('sound_critical', get_parameter('sound_critical', $config['sound_critical']));
|
update_config_value ('sound_critical', get_parameter('sound_critical', $config['sound_critical']));
|
||||||
update_config_value ('sound_warning', get_parameter('sound_warning', $config['sound_warning']));
|
update_config_value ('sound_warning', get_parameter('sound_warning', $config['sound_warning']));
|
||||||
|
|
||||||
update_config_value ('can_block_policies', get_parameter('can_block_policies', $config['can_block_policies']));
|
$enterprise = enterprise_include_once('include/functions_policies.php');
|
||||||
|
if ($enterprise !== ENTERPRISE_NOT_HOOK) {
|
||||||
|
$locked = enterprise_hook('semaphore_policy_test_and_set');
|
||||||
|
if ($locked) {
|
||||||
|
pandora_audit("Policy management", "BLOCK policies for change tconfig['can_block_policies'] by " . $config['id_user']);
|
||||||
|
|
||||||
|
update_config_value ('can_block_policies', get_parameter('can_block_policies', $config['can_block_policies']));
|
||||||
|
|
||||||
|
pandora_audit("Policy management", "UNBLOCK policies for change tconfig['can_block_policies'] by " . $config['id_user']);
|
||||||
|
enterprise_hook('semaphore_policy_unlock');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
pandora_audit("Policy management", "Try to BLOCK policies for change tconfig['can_block_policies'] by " . $config['id_user']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
update_config_value ('can_block_policies', get_parameter('can_block_policies', $config['can_block_policies']));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -323,7 +323,21 @@ function audit_db ($id, $ip, $accion, $descripcion){
|
||||||
*/
|
*/
|
||||||
function pandora_audit ($accion, $descripcion){
|
function pandora_audit ($accion, $descripcion){
|
||||||
global $config;
|
global $config;
|
||||||
$ip = $config["remote_addr"];
|
|
||||||
|
if (isset($config["remote_addr"])) {
|
||||||
|
$ip = $config["remote_addr"];
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if ($_SERVER['REMOTE_ADDR']) {
|
||||||
|
$ip = $_SERVER['REMOTE_ADDR'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$ip = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$id = $config["id_user"];
|
$id = $config["id_user"];
|
||||||
|
|
||||||
$accion = safe_input($accion);
|
$accion = safe_input($accion);
|
||||||
|
|
|
@ -664,7 +664,7 @@ function update_networkmap ($id_networkmap, $values) {
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
/* <![CDATA[ */
|
/* <![CDATA[ */
|
||||||
$(document).ready (function () {
|
$(document).ready (function () {
|
||||||
$("area[title!='<?php echo __('Pandora FMS'); ?>']").cluetip ({
|
$("area[title!='<?php echo 'Pandora FMS'; ?>']").cluetip ({
|
||||||
arrows: true,
|
arrows: true,
|
||||||
attribute: 'title',
|
attribute: 'title',
|
||||||
cluetipClass: 'default'
|
cluetipClass: 'default'
|
||||||
|
|
Loading…
Reference in New Issue