BUG-12021 Audit Log
Improvements Audit Log
This commit is contained in:
@@ -5271,6 +5271,21 @@ class G
|
||||
$oLogger->write($message);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public function auditLog($actionToLog, $valueToLog = "")
|
||||
{
|
||||
$oServerConf = & serverConf::getSingleton();
|
||||
$sflagAudit = $oServerConf->getAuditLogProperty( 'AL_OPTION', SYS_SYS );
|
||||
|
||||
if ($sflagAudit) {
|
||||
$workspace = defined('SYS_SYS') ? SYS_SYS : 'Wokspace Undefined';
|
||||
$username = isset($_SESSION['USER_LOGGED']) && $_SESSION['USER_LOGGED'] != '' ? $_SESSION['USER_LOGGED'] : 'Unknow User';
|
||||
$fullname = isset($_SESSION['USR_FULLNAME']) && $_SESSION['USR_FULLNAME'] != '' ? $_SESSION['USR_FULLNAME'] : '-';
|
||||
G::log("|". $workspace ."|". $username . "|" . $fullname ."|" . $actionToLog . "|" . $valueToLog, PATH_DATA, "audit.log");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes all keys in an array and sub-arrays
|
||||
*
|
||||
@@ -5347,8 +5362,8 @@ class G
|
||||
if((preg_match('/^\*\.?[a-z]{2,8}$/', $val)) || ($val == '*.*')){
|
||||
$allowedDocTypes = substr($val, 2);
|
||||
if(($dtype[count($dtype) -1]) == $allowedDocTypes || $allowedDocTypes == '*'){
|
||||
$res->status = true;
|
||||
return $res;
|
||||
$res->status = true;
|
||||
return $res;
|
||||
break;
|
||||
} else {
|
||||
$flag = 1;
|
||||
@@ -5376,7 +5391,7 @@ class G
|
||||
break;
|
||||
case 'xls':
|
||||
if($docType[1] == 'vnd.ms-excel' || ($dtype[count($dtype) - 1] == 'xls' && $docType[1] == 'plain')){
|
||||
$res->status = true;
|
||||
$res->status = true;
|
||||
return $res;
|
||||
} else {
|
||||
$flag = 1;
|
||||
@@ -5384,7 +5399,7 @@ class G
|
||||
break;
|
||||
case 'doc':
|
||||
if($docType[1] == 'msword' || ($dtype[count($dtype) - 1] == 'doc' && $docType[1] == 'html')){
|
||||
$res->status = true;
|
||||
$res->status = true;
|
||||
return $res;
|
||||
} else {
|
||||
$flag = 1;
|
||||
@@ -5476,7 +5491,7 @@ class G
|
||||
if ($docType[1] != $allowedDocTypes){
|
||||
$flag = 1;
|
||||
} else {
|
||||
$res->status = true;
|
||||
$res->status = true;
|
||||
return $res;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user