Merged in paulis/processmaker/HOR-1471 (pull request #4635)

HOR-1471
This commit is contained in:
Julio Cesar Laura Avendaño
2016-08-01 10:50:14 -04:00
79 changed files with 399 additions and 170 deletions

View File

@@ -266,7 +266,10 @@ class DataBaseMaintenance
// Commented that is not assigned to a variable.
// mysql_escape_string("';");
if (! @mysql_query( $sql )) {
echo mysql_error() . "\n";
$ws = (defined("SYS_SYS"))? SYS_SYS : "Wokspace Undefined";
Bootstrap::registerMonolog('MysqlCron', 400, mysql_error(), array('sql'=>$sql), $ws, 'mysql.log');
$varRes = mysql_error() . "\n";
G::outRes( $varRes );
return false;
}
return true;
@@ -284,7 +287,10 @@ class DataBaseMaintenance
$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'";
if (! @mysql_query( $sql )) {
print mysql_error() . "\n";
$ws = (defined("SYS_SYS"))? SYS_SYS : "Wokspace Undefined";
Bootstrap::registerMonolog('MysqlCron', 400, mysql_error(), array('sql'=>$sql), $ws, 'mysql.log');
$varRes = mysql_error() . "\n";
G::outRes( $varRes );
return false;
}
return true;