diff --git a/framework/src/Maveriks/WebApplication.php b/framework/src/Maveriks/WebApplication.php index 06e4bd7f1..56caa5907 100644 --- a/framework/src/Maveriks/WebApplication.php +++ b/framework/src/Maveriks/WebApplication.php @@ -414,8 +414,6 @@ class WebApplication public function loadEnvironment($workspace = "") { - $this->defineConstantsForPlugin(); - define("PATH_SEP", DIRECTORY_SEPARATOR); define("PATH_TRUNK", $this->rootDir . PATH_SEP); @@ -614,35 +612,4 @@ class WebApplication @unlink(PATH_DATA_SITE . 'routes.php'); @unlink(PATH_DATA . 'sites' . DS . $workspace . DS . 'api-config.php'); } - - /** - * The content of this function comes from the file: - * processmaker/workflow/engine/classes/class.plugin.php, the loading of this - * file is not done by 'require' in this version of ProcessMaker. Therefore, - * these definitions have been moved to this class. - */ - public function defineConstantsForPlugin() - { - define('G_PLUGIN_CLASS', 1); - define('PM_CREATE_CASE', 1001); - define('PM_UPLOAD_DOCUMENT', 1002); - define('PM_CASE_DOCUMENT_LIST', 1003); - define('PM_BROWSE_CASE', 1004); - define('PM_NEW_PROCESS_LIST', 1005); - define('PM_NEW_PROCESS_SAVE', 1006); - define('PM_NEW_DYNAFORM_LIST', 1007); - define('PM_NEW_DYNAFORM_SAVE', 1008); - define('PM_EXTERNAL_STEP', 1009); - define('PM_CASE_DOCUMENT_LIST_ARR', 1010); - define('PM_LOGIN', 1011); - define('PM_UPLOAD_DOCUMENT_BEFORE', 1012); - define('PM_CREATE_NEW_DELEGATION', 1013); - define('PM_SINGLE_SIGN_ON', 1014); - define('PM_GET_CASES_AJAX_LISTENER', 1015); - define('PM_BEFORE_CREATE_USER', 1016); - define('PM_AFTER_LOGIN', 1017); - define('PM_HASH_PASSWORD', 1018); - define('PM_SCHEDULER_CREATE_CASE_BEFORE', 1019); - define('PM_SCHEDULER_CREATE_CASE_AFTER', 1020); - } } diff --git a/gulliver/system/class.g.php b/gulliver/system/class.g.php index 0f88ab4b4..cc6a5c8f9 100644 --- a/gulliver/system/class.g.php +++ b/gulliver/system/class.g.php @@ -5836,6 +5836,34 @@ class G include (PATH_METHODS . "login/version-pmos.php"); } //Removed default version from code. + + /** + * The constants defined comes from the file: + * processmaker/workflow/engine/classes/class.plugin.php, the loading of this + * file is not done by 'require' in this version of ProcessMaker. Therefore, + * these definitions have been moved to this class. + */ + define('G_PLUGIN_CLASS', 1); + define('PM_CREATE_CASE', 1001); + define('PM_UPLOAD_DOCUMENT', 1002); + define('PM_CASE_DOCUMENT_LIST', 1003); + define('PM_BROWSE_CASE', 1004); + define('PM_NEW_PROCESS_LIST', 1005); + define('PM_NEW_PROCESS_SAVE', 1006); + define('PM_NEW_DYNAFORM_LIST', 1007); + define('PM_NEW_DYNAFORM_SAVE', 1008); + define('PM_EXTERNAL_STEP', 1009); + define('PM_CASE_DOCUMENT_LIST_ARR', 1010); + define('PM_LOGIN', 1011); + define('PM_UPLOAD_DOCUMENT_BEFORE', 1012); + define('PM_CREATE_NEW_DELEGATION', 1013); + define('PM_SINGLE_SIGN_ON', 1014); + define('PM_GET_CASES_AJAX_LISTENER', 1015); + define('PM_BEFORE_CREATE_USER', 1016); + define('PM_AFTER_LOGIN', 1017); + define('PM_HASH_PASSWORD', 1018); + define('PM_SCHEDULER_CREATE_CASE_BEFORE', 1019); + define('PM_SCHEDULER_CREATE_CASE_AFTER', 1020); } } diff --git a/workflow/public_html/app.php b/workflow/public_html/app.php index c466fc603..9aa35b0ba 100644 --- a/workflow/public_html/app.php +++ b/workflow/public_html/app.php @@ -40,9 +40,6 @@ try { switch ($stat) { case WebApplication::RUNNING_WORKFLOW: - //TODO: This should be replaced by the 'WebApplication::loadEnvironment()' function, - //the sysGeneric file should no longer define constants. - $app->defineConstantsForPlugin(); include "sysGeneric.php"; break;