Merged in release/3.4.8 (pull request #7282)
PMCORE-1196 Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
4
thirdparty/propel/Propel.php
vendored
4
thirdparty/propel/Propel.php
vendored
@@ -601,7 +601,9 @@ class Propel
|
|||||||
foreach (self::$connectionMap as $cnn) {
|
foreach (self::$connectionMap as $cnn) {
|
||||||
if (get_class($cnn) != "DBArrayConnection") {
|
if (get_class($cnn) != "DBArrayConnection") {
|
||||||
if (isset($cnn->lastQuery)) {
|
if (isset($cnn->lastQuery)) {
|
||||||
if (gettype($cnn->getResource()) == "resource" && $cnn->isConnected() && $cnn->lastQuery != $lastQuery) {
|
$existsIsConnectedMethod = method_exists($cnn, "isConnected");
|
||||||
|
$existsCloseMethod = method_exists($cnn, "close");
|
||||||
|
if ($existsIsConnectedMethod && $existsCloseMethod && $cnn->isConnected() && $cnn->lastQuery != $lastQuery) {
|
||||||
$cnn->close();
|
$cnn->close();
|
||||||
}
|
}
|
||||||
$lastQuery = $cnn->lastQuery;
|
$lastQuery = $cnn->lastQuery;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace ProcessMaker\Core;
|
namespace ProcessMaker\Core;
|
||||||
|
|
||||||
|
use Bootstrap;
|
||||||
use Exception;
|
use Exception;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use ProcessMaker\BusinessModel\Factories\Jobs;
|
use ProcessMaker\BusinessModel\Factories\Jobs;
|
||||||
@@ -140,12 +141,14 @@ class JobsManager
|
|||||||
|
|
||||||
$_SESSION = $environment['session'];
|
$_SESSION = $environment['session'];
|
||||||
$_SERVER = $environment['server'];
|
$_SERVER = $environment['server'];
|
||||||
Propel::initConfiguration($environment['configuration']);
|
|
||||||
foreach ($environment['constants'] as $key => $value) {
|
foreach ($environment['constants'] as $key => $value) {
|
||||||
if (!defined($key)) {
|
if (!defined($key)) {
|
||||||
define($key, $value);
|
define($key, $value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Propel::close();
|
||||||
|
Propel::init(PATH_CONFIG . "databases.php");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -190,6 +193,11 @@ class JobsManager
|
|||||||
$callback($environment);
|
$callback($environment);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
Log::error($e->getMessage() . ": " . $e->getTraceAsString());
|
Log::error($e->getMessage() . ": " . $e->getTraceAsString());
|
||||||
|
$context = [
|
||||||
|
"trace" => $e->getTraceAsString(),
|
||||||
|
"workspace" => $environment["constants"]["SYS_SYS"]
|
||||||
|
];
|
||||||
|
Bootstrap::registerMonolog("queue:work", 400, $e->getMessage(), $context, "");
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -534,9 +534,10 @@ class Delegation extends Model
|
|||||||
$selfServiceTasks = TaskUser::getSelfServicePerUser($usrUid);
|
$selfServiceTasks = TaskUser::getSelfServicePerUser($usrUid);
|
||||||
|
|
||||||
if (!empty($selfServiceTasks)) {
|
if (!empty($selfServiceTasks)) {
|
||||||
// Start the first query
|
// Start the second query
|
||||||
$query2 = Delegation::query()->select('APP_NUMBER');
|
$query2 = Delegation::query()->select('APP_NUMBER');
|
||||||
$query2->tasksIn($selfServiceTasks);
|
$query2->tasksIn($selfServiceTasks);
|
||||||
|
$query2->isThreadOpen();
|
||||||
$query2->noUserInThread();
|
$query2->noUserInThread();
|
||||||
|
|
||||||
// Build the complex query that uses "UNION DISTINCT" clause
|
// Build the complex query that uses "UNION DISTINCT" clause
|
||||||
|
|||||||
@@ -1079,15 +1079,24 @@ Ext.onReady(function(){
|
|||||||
try {
|
try {
|
||||||
var data = Ext.util.JSON.decode(result.responseText);
|
var data = Ext.util.JSON.decode(result.responseText);
|
||||||
if (data.status == true) {
|
if (data.status == true) {
|
||||||
// The case was cancelled
|
if (!isBrowserIE()) {
|
||||||
parent.notify('', _("ID_CASE_CANCELLED", stringReplace("\\: ", "", _APP_NUM)));
|
// The case was cancelled
|
||||||
|
parent.notify('', _("ID_CASE_CANCELLED", stringReplace("\\: ", "", _APP_NUM)));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// The case wasn't cancel
|
if (!isBrowserIE()) {
|
||||||
parent.notify('', data.msg);
|
// The case wasn't cancel
|
||||||
|
parent.notify('', data.msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
parent.updateCasesTree();
|
parent.updateCasesTree();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
parent.notify('', _('ID_SOMETHING_WRONG'));
|
if (isBrowserIE()) {
|
||||||
|
Ext.MessageBox.alert(_('ID_FAILED'), _('ID_SOMETHING_WRONG'));
|
||||||
|
} else {
|
||||||
|
parent.notify('', _('ID_SOMETHING_WRONG'));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
location.href = 'casesListExtJs';
|
location.href = 'casesListExtJs';
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user