This commit is contained in:
Paula Quispe
2017-11-10 17:04:56 -04:00
parent 8d93f051cc
commit 5beb7623b3
8 changed files with 10 additions and 10 deletions

View File

@@ -267,7 +267,7 @@ class DataBaseMaintenance
// Commented that is not assigned to a variable. // Commented that is not assigned to a variable.
// mysql_escape_string("';"); // mysql_escape_string("';");
if (! @mysql_query( $sql )) { if (! @mysql_query( $sql )) {
$ws = (!empty(config("system.workspace")))? config("system.workspace") : "Wokspace Undefined"; $ws = (!empty(config("system.workspace")))? config("system.workspace") : "Undefined Workspace";
Bootstrap::registerMonolog('MysqlCron', 400, mysql_error(), array('sql'=>$sql), $ws, 'processmaker.log'); Bootstrap::registerMonolog('MysqlCron', 400, mysql_error(), array('sql'=>$sql), $ws, 'processmaker.log');
$varRes = mysql_error() . "\n"; $varRes = mysql_error() . "\n";
G::outRes( $varRes ); G::outRes( $varRes );
@@ -288,7 +288,7 @@ class DataBaseMaintenance
$tableName = str_replace( '.dump', '', basename( $backupFile ) ); $tableName = str_replace( '.dump', '', basename( $backupFile ) );
$sql = "LOAD DATA INFILE '$backupFile' INTO TABLE $tableName FIELDS TERMINATED BY '\t|\t' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\t\t\r\r\n'"; $sql = "LOAD DATA INFILE '$backupFile' INTO TABLE $tableName FIELDS TERMINATED BY '\t|\t' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\t\t\r\r\n'";
if (! @mysql_query( $sql )) { if (! @mysql_query( $sql )) {
$ws = (!empty(config("system.workspace")))? config("system.workspace") : "Wokspace Undefined"; $ws = (!empty(config("system.workspace")))? config("system.workspace") : "Undefined Workspace";
Bootstrap::registerMonolog('MysqlCron', 400, mysql_error(), array('sql'=>$sql), $ws, 'processmaker.log'); Bootstrap::registerMonolog('MysqlCron', 400, mysql_error(), array('sql'=>$sql), $ws, 'processmaker.log');
$varRes = mysql_error() . "\n"; $varRes = mysql_error() . "\n";
G::outRes( $varRes ); G::outRes( $varRes );

View File

@@ -5447,7 +5447,7 @@ class G
*/ */
public static function auditLog($actionToLog, $valueToLog = "") public static function auditLog($actionToLog, $valueToLog = "")
{ {
$workspace = !empty(config("system.workspace")) ? config("system.workspace") : 'Wokspace Undefined'; $workspace = !empty(config("system.workspace")) ? config("system.workspace") : 'Undefined Workspace';
$conf = new Configurations(); $conf = new Configurations();
$sflag = $conf->getConfiguration('AUDIT_LOG', 'log'); $sflag = $conf->getConfiguration('AUDIT_LOG', 'log');
$sflagAudit = $sflag == 'true' ? true : false; $sflagAudit = $sflag == 'true' ? true : false;

View File

@@ -21,7 +21,7 @@ class PMException extends Exception
} }
public static function registerErrorLog($error, $token){ public static function registerErrorLog($error, $token){
$ws = (!empty(config("system.workspace")))? config("system.workspace") : "Wokspace Undefined"; $ws = (!empty(config("system.workspace")))? config("system.workspace") : "Undefined Workspace";
Bootstrap::registerMonolog('ExceptionCron', 400, $error->getMessage(), array('token'=>$token), $ws, 'processmaker.log'); Bootstrap::registerMonolog('ExceptionCron', 400, $error->getMessage(), array('token'=>$token), $ws, 'processmaker.log');
} }
} }

View File

@@ -255,7 +255,7 @@ class XmlFormField
$rs = $con->executeQuery( $query, ResultSet::FETCHMODE_NUM ); $rs = $con->executeQuery( $query, ResultSet::FETCHMODE_NUM );
} catch (Exception $e) { } catch (Exception $e) {
//dismiss error because dbarray shouldnt be defined in some contexts. //dismiss error because dbarray shouldnt be defined in some contexts.
$workspace = !empty(config("system.workspace"))? config("system.workspace") : "Wokspace Undefined"; $workspace = !empty(config("system.workspace"))? config("system.workspace") : "Undefined Workspace";
G::log($workspace . " | ip: | " . G::getIpAddress() . " | type error: | " . $e->getMessage() . " | query: " . $query, PATH_DATA, "queriesWithErrors.log"); G::log($workspace . " | ip: | " . G::getIpAddress() . " | type error: | " . $e->getMessage() . " | query: " . $query, PATH_DATA, "queriesWithErrors.log");
return $result; return $result;
@@ -267,7 +267,7 @@ class XmlFormField
$rs = $stmt->executeQuery( $query, ResultSet::FETCHMODE_NUM ); $rs = $stmt->executeQuery( $query, ResultSet::FETCHMODE_NUM );
} catch (Exception $e) { } catch (Exception $e) {
//dismiss error because dbarray shouldnt be defined in some contexts. //dismiss error because dbarray shouldnt be defined in some contexts.
$workspace = !empty(config("system.workspace"))? config("system.workspace") : "Wokspace Undefined"; $workspace = !empty(config("system.workspace"))? config("system.workspace") : "Undefined Workspace";
G::log($workspace . " | ip: | " . G::getIpAddress() . " | type error: | " . $e->getMessage() . " | query: " . $query, PATH_DATA, "queriesWithErrors.log"); G::log($workspace . " | ip: | " . G::getIpAddress() . " | type error: | " . $e->getMessage() . " | query: " . $query, PATH_DATA, "queriesWithErrors.log");
return $result; return $result;

View File

@@ -650,7 +650,7 @@ class IndicatorsCalculator
} }
private function pdoConnection() { private function pdoConnection() {
$currentWS = !empty(config("system.workspace")) ? config("system.workspace") : 'Wokspace Undefined'; $currentWS = !empty(config("system.workspace")) ? config("system.workspace") : 'Undefined Workspace';
$workSpace = new WorkspaceTools($currentWS); $workSpace = new WorkspaceTools($currentWS);
$arrayHost = explode(':', $workSpace->dbHost); $arrayHost = explode(':', $workSpace->dbHost);
$host = "host=".$arrayHost[0]; $host = "host=".$arrayHost[0];

View File

@@ -63,7 +63,7 @@ class EmailServer
$currentUser = $RBAC->aUserInfo['USER_INFO']; $currentUser = $RBAC->aUserInfo['USER_INFO'];
$info = array( $info = array(
'ip' => G::getIpAddress(), 'ip' => G::getIpAddress(),
'workspace' => (!empty(config("system.workspace"))) ? config("system.workspace") : "Workspace undefined", 'workspace' => (!empty(config("system.workspace"))) ? config("system.workspace") : "Undefined Workspace",
'usrUid' => $currentUser['USR_UID'] 'usrUid' => $currentUser['USR_UID']
); );
$this->setContextLog($info); $this->setContextLog($info);

View File

@@ -1151,7 +1151,7 @@ class TimerEvent
private function log($action, $value = "", $status = "action") private function log($action, $value = "", $status = "action")
{ {
try { try {
$workspace = (!empty(config("system.workspace")))? config("system.workspace") : "Wokspace Undefined"; $workspace = (!empty(config("system.workspace")))? config("system.workspace") : "Undefined Workspace";
$ipClient = \G::getIpAddress(); $ipClient = \G::getIpAddress();
$actionTimer = "timereventcron: "; $actionTimer = "timereventcron: ";

View File

@@ -138,7 +138,7 @@ class Bpmn extends Handler
//Define the variables for the logging //Define the variables for the logging
$info = array( $info = array(
'ip' => G::getIpAddress(), 'ip' => G::getIpAddress(),
'workspace' => (!empty(config("system.workspace")))? config("system.workspace") : "Workspace undefined" 'workspace' => (!empty(config("system.workspace")))? config("system.workspace") : "Undefined Workspace"
); );
$this->setContextLog($info); $this->setContextLog($info);
} }