2013-03-22 Ramon Novoa <rnovoa@artica.es>

* include/functions_db.php: Always display the source ip address
	  when calling db_pandora_audit.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
ramonn 2013-03-22 13:23:26 +00:00
parent 1198e56dcd
commit 4aec2e65d1
3 changed files with 14 additions and 10 deletions

View File

@ -1,3 +1,8 @@
2013-03-22 Ramon Novoa <rnovoa@artica.es>
* include/functions_db.php: Always display the source ip address
when calling db_pandora_audit.
2013-03-22 Mario Pulido <mario.pulido@artica.es>
* godmode/alerts/configure_alert_template.php,

View File

@ -33,7 +33,7 @@ if (empty($script_tz)){
global $develop_bypass;
/* Help to debug problems. Override global PHP configuration */
if (!isset($develop_bypass)) $develop_bypass = 0;
$develop_bypass = 0;
if ($develop_bypass != 1) {
// error_reporting(E_ALL);

View File

@ -121,17 +121,16 @@ function db_escape_string_sql($string) {
function db_pandora_audit($accion, $descripcion, $user_id = false, $ip = true, $info = '') {
global $config;
if ($ip !== false) {
if (isset($config["remote_addr"])) {
$ip = $config["remote_addr"];
// Ignore $ip and always set the ip address
if (isset($config["remote_addr"])) {
$ip = $config["remote_addr"];
}
else {
if ($_SERVER['REMOTE_ADDR']) {
$ip = $_SERVER['REMOTE_ADDR'];
}
else {
if ($_SERVER['REMOTE_ADDR']) {
$ip = $_SERVER['REMOTE_ADDR'];
}
else {
$ip = null;
}
$ip = __('N/A');
}
}