diff --git a/.gitignore b/.gitignore index 01ddee998..1935ddc44 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ update.sh # Ignore build artifacts and logs workflow/public_html/build-log.html workflow/public_html/mix-manifest.json +workflow/public_html/index.html workflow/public_html/webapp/ workflow/public_html/translations/ workflow/public_html/files/ diff --git a/README.md b/README.md index fd998d0aa..e799a29b0 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ README ====== -Lurana v3.8 +Lurana v1.0 ---------------- diff --git a/docker/build.sh b/docker/build.sh index 969829657..e92f2d81c 100644 --- a/docker/build.sh +++ b/docker/build.sh @@ -14,7 +14,7 @@ composer update composer install # Construct the Docker image tag name -tagname="gitlab.luranasoft.com:5050/pm/processmaker:$1" +tagname="gitlab.luranasoft.com:5050/luos/core/luos:$1" echo "Docker tag name: $tagname" # Build the Docker image using the new tag name diff --git a/gulliver/system/class.templatePower.php b/gulliver/system/class.templatePower.php index 7bc985ee7..f3c2c4c6f 100644 --- a/gulliver/system/class.templatePower.php +++ b/gulliver/system/class.templatePower.php @@ -605,11 +605,7 @@ class TemplatePower extends TemplatePowerParser public function newBlock($blockname) { $parent = &$this->content[$this->parent[$blockname] . '_' . $this->index[$this->parent[$blockname]]]; - if (is_array($parent) || $parent instanceof Countable) { - $lastitem = sizeof($parent); - } else { - $lastitem = 0; // or handle it in another way as needed - } + $lastitem = sizeof($parent); $lastitem > 1 ? $lastitem-- : $lastitem = 0; $ind_blockname = $blockname . '_' . $this->index[$blockname]; if (!isset($parent[$lastitem]["_B:$blockname"])) { diff --git a/workflow/engine/classes/class.plugin.php b/workflow/engine/classes/class.plugin.php index fe7f4ab8a..f7cb04ab8 100644 --- a/workflow/engine/classes/class.plugin.php +++ b/workflow/engine/classes/class.plugin.php @@ -15,8 +15,7 @@ class PMPlugin extends PmPluginCompatibility public $sPluginFolder = ''; public $aWorkspaces = null; public $bPrivate = false; - public $sDescription; - public $sSetupPage; + /** * This function sets values to the plugin * @param string $sNamespace @@ -29,8 +28,6 @@ class PMPlugin extends PmPluginCompatibility $this->sClassName = $sNamespace . 'Plugin'; $this->sPluginFolder = $sNamespace; $this->sFilename = $sFilename; - $this->sDescription = null; - $this->sSetupPage = null; } /** diff --git a/workflow/engine/methods/cases/casesListExtJsRedirector.php b/workflow/engine/methods/cases/casesListExtJsRedirector.php index 013361010..c1db18ec7 100644 --- a/workflow/engine/methods/cases/casesListExtJsRedirector.php +++ b/workflow/engine/methods/cases/casesListExtJsRedirector.php @@ -30,13 +30,14 @@ if (isset($_GET['ux'])) { if ($statusPMGmail) { echo '} else { window.parent.location.href = \''.$pathDerivateGmail.'\'; }'; } else { - echo '} else { + echo '} else { if (parent.parent.postMessage) { parent.parent.postMessage("redirect=todo","*"); } else { window.parent.location.href = \'casesListExtJs\'; } }'; + } } echo "try {parent.parent.updateCasesTree();parent.parent.highlightCasesTree();} catch(e) {}"; ?> diff --git a/workflow/engine/methods/login/authentication.php b/workflow/engine/methods/login/authentication.php index 80318183b..b95920f11 100644 --- a/workflow/engine/methods/login/authentication.php +++ b/workflow/engine/methods/login/authentication.php @@ -236,17 +236,16 @@ try { $_SESSION['USR_TIME_ZONE'] = $userTimeZone; } - if (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__']) { - $dateTime = new \ProcessMaker\Util\DateTime(); + if (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__']) { + $dateTime = new \ProcessMaker\Util\DateTime(); - $timeZoneOffset = $dateTime->getTimeZoneOffsetByTimeZoneId($_SESSION['USR_TIME_ZONE']); + $timeZoneOffset = $dateTime->getTimeZoneOffsetByTimeZoneId($_SESSION['USR_TIME_ZONE']); - if ($timeZoneOffset === false || $timeZoneOffset != (int)($_POST['form']['BROWSER_TIME_ZONE_OFFSET'])) { - // disable the validation, because plugin enhanced inbox was not working... - //$_SESSION['__TIME_ZONE_FAILED__'] = true; - //$_SESSION['BROWSER_TIME_ZONE'] = $dateTime->getTimeZoneIdByTimeZoneOffset((int)$_POST['form']['BROWSER_TIME_ZONE_OFFSET'], false); + if ($timeZoneOffset === false || $timeZoneOffset != (int)($_POST['form']['BROWSER_TIME_ZONE_OFFSET'])) { + $_SESSION['__TIME_ZONE_FAILED__'] = true; + $_SESSION['BROWSER_TIME_ZONE'] = $dateTime->getTimeZoneIdByTimeZoneOffset((int)$_POST['form']['BROWSER_TIME_ZONE_OFFSET'], false); + } } - } //Set data $aUser = $RBAC->userObj->load($_SESSION['USER_LOGGED']); diff --git a/workflow/engine/methods/login/sysLogin.php b/workflow/engine/methods/login/sysLogin.php index ae926d201..4bee97c17 100644 --- a/workflow/engine/methods/login/sysLogin.php +++ b/workflow/engine/methods/login/sysLogin.php @@ -133,14 +133,6 @@ $version = explode('.', trim(file_get_contents(PATH_GULLIVER . 'VERSION'))); $version = isset($version[0]) ? intval($version[0]) : 0; switch (WS_IN_LOGIN) { case 'serverconf': - //Get Server Configuration - $oServerConf = ServerConf::getSingleton(); - if ($oServerConf->getProperty('LOGIN_NO_WS')) { - $fileLogin = $version >= 3 ? 'login/sysLoginNoWSpm3' : 'login/sysLoginNoWS'; - } else { - $fileLogin = 'login/sysLogin'; - } - break; case 'no': $fileLogin = $version >= 3 ? 'login/sysLoginNoWSpm3' : 'login/sysLoginNoWS'; break; diff --git a/workflow/engine/skinEngine/skinEngine.php b/workflow/engine/skinEngine/skinEngine.php index b01d525c8..e42a42a91 100644 --- a/workflow/engine/skinEngine/skinEngine.php +++ b/workflow/engine/skinEngine/skinEngine.php @@ -814,6 +814,7 @@ class SkinEngine define('NO_DISPLAY_USERNAME', 0); } if (NO_DISPLAY_USERNAME == 0) { + if (!defined('SYS_COLLECTION')) define('SYS_COLLECTION', ''); $switch_interface = isset($_SESSION['user_experience']) && $_SESSION['user_experience'] == 'SWITCHABLE'; $smarty->assign('user_logged', (isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '')); diff --git a/workflow/engine/src/ProcessMaker/Plugins/PluginRegistry.php b/workflow/engine/src/ProcessMaker/Plugins/PluginRegistry.php index 62c27f0cb..6c8d7928e 100644 --- a/workflow/engine/src/ProcessMaker/Plugins/PluginRegistry.php +++ b/workflow/engine/src/ProcessMaker/Plugins/PluginRegistry.php @@ -110,6 +110,7 @@ class PluginRegistry $this->_aPluginDetails[$Namespace]->setVersion($plugin->iVersion); return; } + $detail = new PluginDetail( $Namespace, $ClassName, diff --git a/workflow/engine/src/ProcessMaker/Project/Adapter/BpmnWorkflow.php b/workflow/engine/src/ProcessMaker/Project/Adapter/BpmnWorkflow.php index 10ff8f80d..df6e15e11 100644 --- a/workflow/engine/src/ProcessMaker/Project/Adapter/BpmnWorkflow.php +++ b/workflow/engine/src/ProcessMaker/Project/Adapter/BpmnWorkflow.php @@ -793,7 +793,7 @@ class BpmnWorkflow extends Project\Bpmn private function createTaskByElement($elementUid, $elementType, $key, $eventName = '') { try { - $taskTitle = empty($eventName) ? $taskType : $eventName; + $taskTitle = empty($eventName) ? $elementType : $eventName; if (isset($this->arrayElementTaskRelation[$elementUid])) { $taskUid = $this->arrayElementTaskRelation[$elementUid]; @@ -831,7 +831,7 @@ class BpmnWorkflow extends Project\Bpmn $prefix = $this->arrayTaskAttribute[$key]["prefix"]; $taskUid = $this->wp->addTask([ "TAS_UID" => $prefix . substr(Common::generateUID(), (32 - strlen($prefix)) * -1), - "TAS_TYPE" => $taskType, + "TAS_TYPE" => 'NORMAL', "TAS_TITLE" => $taskTitle, "TAS_POSX" => $taskPosX, "TAS_POSY" => $taskPosY diff --git a/workflow/engine/templates/cases/cases_Load.php b/workflow/engine/templates/cases/cases_Load.php index 2589895b9..4fcca1b52 100644 --- a/workflow/engine/templates/cases/cases_Load.php +++ b/workflow/engine/templates/cases/cases_Load.php @@ -14,7 +14,7 @@ $filter = new InputFilter(); } - diff --git a/workflow/public_html/app.php b/workflow/public_html/app.php index cf687e63e..e8a7b412a 100644 --- a/workflow/public_html/app.php +++ b/workflow/public_html/app.php @@ -12,10 +12,8 @@ require_once __DIR__ . '/../../gulliver/system/class.g.php'; require_once __DIR__ . '/../../bootstrap/autoload.php'; require_once __DIR__ . '/../../bootstrap/app.php'; -//Initialize application event AppEvent::getAppEvent(); -// Register shutdown function to close Propel if it exists register_shutdown_function( function () { if (class_exists('Propel')) { @@ -24,21 +22,19 @@ register_shutdown_function( } ); -// Set session cookie settings ini_set("session.cookie_httponly", 1); -// Handle unencoded URL if (isset($_SERVER['UNENCODED_URL'])) { $_SERVER['REQUEST_URI'] = $_SERVER['UNENCODED_URL']; } try { $rootDir = realpath(__DIR__ . "/../../") . DIRECTORY_SEPARATOR; + $app = new WebApplication(); + $app->setRootDir($rootDir); $app->setRequestUri($_SERVER['REQUEST_URI']); - - // Route the application $stat = $app->route(); switch ($stat) { @@ -67,43 +63,8 @@ try { break; } } catch (RBACException $e) { - handleRBACException($e); -} catch (Exception $e) { - //handleGeneralException($e, $rootDir); - $view = new PhtmlView($rootDir . "framework/src/templates/Exception.phtml"); - $view->set("message", $e->getMessage()); - $view->set("exception", $e); - - $response = new Response($view->getOutput(), 503); - $response->send(); - -} - -/** - * Handle the application state based on routing status. - * - * @param int $stat - * @param WebApplication $app - */ -function handleApplicationState(int $stat, WebApplication $app): void { -} - -/** - * Handle RBAC exceptions by redirecting to the specified path. - * - * @param RBACException $e - */ -function handleRBACException(RBACException $e): void { G::header('location: ' . $e->getPath()); -} - -/** - * Handle general exceptions by rendering an error view. - * - * @param Exception $e - * @param string $rootDir - */ -function handleGeneralException(Exception $e, string $rootDir): void { +} catch (Exception $e) { $view = new PhtmlView($rootDir . "framework/src/templates/Exception.phtml"); $view->set("message", $e->getMessage()); $view->set("exception", $e); @@ -111,3 +72,4 @@ function handleGeneralException(Exception $e, string $rootDir): void { $response = new Response($view->getOutput(), 503); $response->send(); } +