PMCORE-4144
This commit is contained in:
@@ -22,6 +22,7 @@ use ProcessMaker\Plugins\PluginRegistry;
|
||||
use ProcessMaker\Validation\ValidationUploadedFiles;
|
||||
use ProcessUserPeer;
|
||||
use ResultSet;
|
||||
use stdClass;
|
||||
use StepPeer;
|
||||
use StepSupervisorPeer;
|
||||
use Users;
|
||||
@@ -541,6 +542,21 @@ class InputDocument
|
||||
$iDocVersion = $oAppDocument->getDocVersion();
|
||||
$info = pathinfo($oAppDocument->getAppDocFilename());
|
||||
|
||||
// Plugin Hook PM_REDIRECT to redirect to a custom page
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
|
||||
// If the hook exists try to execute
|
||||
if ($pluginRegistry->existsTrigger(PM_REDIRECT)) {
|
||||
// Build the object to send
|
||||
$data = new stdClass();
|
||||
$data->sApplicationUid = $oAppDocument->getAppUid();
|
||||
$data->appDocUid = $oAppDocument->getAppDocUid();
|
||||
$data->docType = '';
|
||||
|
||||
// Execute hook
|
||||
$pluginRegistry->executeTriggers(PM_REDIRECT, $data);
|
||||
}
|
||||
|
||||
$app_uid = G::getPathFromUID($oAppDocument->Fields['APP_UID']);
|
||||
$file = G::getPathFromFileUID($oAppDocument->Fields['APP_UID'], $sAppDocUid);
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ namespace ProcessMaker\BusinessModel\Cases;
|
||||
|
||||
use ProcessMaker\Core\System;
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
use stdClass;
|
||||
|
||||
class OutputDocument
|
||||
{
|
||||
@@ -372,6 +373,21 @@ class OutputDocument
|
||||
|
||||
$pathInfo = pathinfo($appDocument->getAppDocFilename());
|
||||
|
||||
// Plugin Hook PM_REDIRECT to redirect to a custom page
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
|
||||
// If the hook exists try to execute
|
||||
if ($pluginRegistry->existsTrigger(PM_REDIRECT)) {
|
||||
// Build the object to send
|
||||
$data = new stdClass();
|
||||
$data->sApplicationUid = $appDocument->getAppUid();
|
||||
$data->appDocUid = $appDocument->getAppDocUid();
|
||||
$data->docType = $ext;
|
||||
|
||||
// Execute hook
|
||||
$pluginRegistry->executeTriggers(PM_REDIRECT, $data);
|
||||
}
|
||||
|
||||
$extensionDoc = $ext;
|
||||
|
||||
$versionDoc = '_' . $arrayAppDocumentData['DOC_VERSION'];
|
||||
|
||||
Reference in New Issue
Block a user