Merged in julceslau/processmaker (pull request #908)
Fix a couple of strict notices for PHP 5.4
This commit is contained in:
@@ -5273,19 +5273,19 @@ class G
|
||||
|
||||
/**
|
||||
*/
|
||||
public function auditLog($actionToLog, $valueToLog = "")
|
||||
{
|
||||
public static function auditLog($actionToLog, $valueToLog = "")
|
||||
{
|
||||
$oServerConf = & serverConf::getSingleton();
|
||||
$sflagAudit = $oServerConf->getAuditLogProperty( 'AL_OPTION', SYS_SYS );
|
||||
$ipClient = G::getIpAddress();
|
||||
|
||||
$licensedFeatures = & PMLicensedFeatures::getSingleton();
|
||||
if ($sflagAudit && $licensedFeatures->verifyfeature('vtSeHNhT0JnSmo1bTluUVlTYUxUbUFSVStEeXVqc1pEUG5EeXc0MGd2Q3ErYz0=')) {
|
||||
$workspace = defined('SYS_SYS') ? SYS_SYS : 'Wokspace Undefined';
|
||||
$username = isset($_SESSION['USER_LOGGED']) && $_SESSION['USER_LOGGED'] != '' ? $_SESSION['USER_LOGGED'] : 'Unknow User';
|
||||
$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 ."|". $ipClient ."|". $username . "|" . $fullname ."|" . $actionToLog . "|" . $valueToLog, PATH_DATA, "audit.log");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5347,9 +5347,9 @@ class G
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify the InputDoc extension, cheking the file name extension (.pdf, .ppt) and the file content.
|
||||
* Verify the InputDoc extension, cheking the file name extension (.pdf, .ppt) and the file content.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
public function verifyInputDocExtension($InpDocAllowedFiles, $filesName, $filesTmpName){
|
||||
@@ -5380,7 +5380,7 @@ class G
|
||||
$finfo = new finfo(FILEINFO_MIME_TYPE);
|
||||
$finfo_ = $finfo->file($filesTmpName);
|
||||
$docType = explode("/", $finfo_);
|
||||
|
||||
|
||||
foreach ($allowedTypes as $types => $val) {
|
||||
if((preg_match('/^\*\.?[a-z]{2,8}$/', $val)) || ($val == '*.*')){
|
||||
$allowedDocTypes = substr($val, 2);
|
||||
|
||||
@@ -76,7 +76,7 @@ class serverConf
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
public function &getSingleton()
|
||||
public static function &getSingleton()
|
||||
{
|
||||
if (self::$instance == null) {
|
||||
self::$instance = new serverConf();
|
||||
@@ -518,4 +518,3 @@ class serverConf
|
||||
return in_array($lang, $this->rtlLang);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user