From 11ad7eb6154bd89e1b68f4417c8dd213c2ca8cf6 Mon Sep 17 00:00:00 2001 From: Luis Fernando Saisa Lopez Date: Wed, 12 Jun 2013 16:14:25 +0000 Subject: [PATCH 1/2] BUG 11150 "Add a PM variable to the cases step" SOLVED - Add a PM variable to the cases step - Problema resuelto, se validara la variable $_SESSION["PROCESSMAKER_RUN_OUTSIDE_MAIN_APPLICATION"], si se ha definido la variable no se ejecutara el fragmento de codigo, si variable no esta definido se ejecutara el fragmento de codigo. * Available from version ProcessMaker-2.5.1-testing.2 --- workflow/engine/methods/cases/cases_Step.php | 47 +++++++++++--------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/workflow/engine/methods/cases/cases_Step.php b/workflow/engine/methods/cases/cases_Step.php index 4804d62f7..d8ee67275 100755 --- a/workflow/engine/methods/cases/cases_Step.php +++ b/workflow/engine/methods/cases/cases_Step.php @@ -1,9 +1,9 @@ - parent.location = "../cases/casesStartPage?action=startCase"; - '); +if (!isset($_SESSION['USER_LOGGED'])) { + G::SendTemporalMessage( 'ID_LOGIN_AGAIN', 'warning', 'labels' ); + die( ''); } /** * cases_Step.php @@ -219,12 +219,15 @@ try { $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['DYNUIDPRINT'] = $_GET['UID']; $oHeadPublisher = & headPublisher::getSingleton(); - $oHeadPublisher->addScriptCode( " - if (typeof parent != 'undefined') { - if (parent.setNode) { - parent.setNode('" . $_GET['UID'] . "'); - } - }" ); + + if(!isset($_SESSION["PROCESSMAKER_RUN_OUTSIDE_MAIN_APPLICATION"])) { + $oHeadPublisher->addScriptCode( " + if (typeof parent != 'undefined') { + if (parent.setNode) { + parent.setNode('" . $_GET['UID'] . "'); + } + }" ); + } $oStep = new Step(); $oStep = $oStep->loadByProcessTaskPosition( $_SESSION['PROCESS'], $_SESSION['TASK'], $_GET['POSITION'] ); @@ -996,16 +999,20 @@ try { $oHeadPublisher = & headPublisher::getSingleton(); $oHeadPublisher->addScriptFile( "/jscore/cases/core/cases_Step.js" ); -$oHeadPublisher->addScriptCode( " - if (typeof parent != 'undefined') { - if (parent.showCaseNavigatorPanel) { - parent.showCaseNavigatorPanel('$sStatus'); - } - if (parent.setCurrent) { - parent.setCurrent('" . $_GET['UID'] . "'); - } - }" ); +if(!isset($_SESSION["PROCESSMAKER_RUN_OUTSIDE_MAIN_APPLICATION"])) { + $oHeadPublisher->addScriptCode( " + if (typeof parent != 'undefined') { + if (parent.showCaseNavigatorPanel) { + parent.showCaseNavigatorPanel('$sStatus'); + } + + if (parent.setCurrent) { + parent.setCurrent('" . $_GET['UID'] . "'); + } + }" ); + +} G::RenderPage( 'publish', 'blank' ); From 6045f54a1d3217ddd07201945b7cc2fc4f9886bc Mon Sep 17 00:00:00 2001 From: Luis Fernando Saisa Lopez Date: Wed, 12 Jun 2013 17:10:30 +0000 Subject: [PATCH 2/2] BUG 11150 "Add a PM variable to the cases step" SOLVED - Add a PM variable to the cases step - Problema resuelto, se validara la variable $_SESSION["PM_RUN_OUTSIDE_MAIN_APP"], si se ha definido la variable no se ejecutara el fragmento de codigo, si variable no esta definido se ejecutara el fragmento de codigo. * Available from version ProcessMaker-2.5.1-testing.2 --- workflow/engine/methods/cases/cases_Step.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/engine/methods/cases/cases_Step.php b/workflow/engine/methods/cases/cases_Step.php index d8ee67275..b270d73da 100755 --- a/workflow/engine/methods/cases/cases_Step.php +++ b/workflow/engine/methods/cases/cases_Step.php @@ -220,7 +220,7 @@ try { $oHeadPublisher = & headPublisher::getSingleton(); - if(!isset($_SESSION["PROCESSMAKER_RUN_OUTSIDE_MAIN_APPLICATION"])) { + if(!isset($_SESSION["PM_RUN_OUTSIDE_MAIN_APP"])) { $oHeadPublisher->addScriptCode( " if (typeof parent != 'undefined') { if (parent.setNode) { @@ -1000,7 +1000,7 @@ try { $oHeadPublisher = & headPublisher::getSingleton(); $oHeadPublisher->addScriptFile( "/jscore/cases/core/cases_Step.js" ); -if(!isset($_SESSION["PROCESSMAKER_RUN_OUTSIDE_MAIN_APPLICATION"])) { +if(!isset($_SESSION["PM_RUN_OUTSIDE_MAIN_APP"])) { $oHeadPublisher->addScriptCode( " if (typeof parent != 'undefined') { if (parent.showCaseNavigatorPanel) {