Updating for main processmaker script
This commit is contained in:
@@ -232,7 +232,7 @@ class WebApplication
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function loadEnvironment($workspace)
|
public function loadEnvironment($workspace = "")
|
||||||
{
|
{
|
||||||
$lang = "en";
|
$lang = "en";
|
||||||
|
|
||||||
@@ -326,6 +326,10 @@ class WebApplication
|
|||||||
define("PATH_TEMPORAL", PATH_C . "dynEditor/");
|
define("PATH_TEMPORAL", PATH_C . "dynEditor/");
|
||||||
define("PATH_DB", PATH_DATA . "sites" . PATH_SEP);
|
define("PATH_DB", PATH_DATA . "sites" . PATH_SEP);
|
||||||
|
|
||||||
|
if (empty($workspace)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
define("SYS_SYS", $workspace);
|
define("SYS_SYS", $workspace);
|
||||||
|
|
||||||
if (! file_exists( PATH_DB . SYS_SYS . "/db.php" )) {
|
if (! file_exists( PATH_DB . SYS_SYS . "/db.php" )) {
|
||||||
@@ -367,5 +371,7 @@ class WebApplication
|
|||||||
//$memcache = PMmemcached::getSingleton( SYS_SYS );
|
//$memcache = PMmemcached::getSingleton( SYS_SYS );
|
||||||
|
|
||||||
\Propel::init(PATH_CONFIG . "databases.php");
|
\Propel::init(PATH_CONFIG . "databases.php");
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -25,59 +25,80 @@
|
|||||||
* @author Alexandre Rosenfeld <alexandre@colosa.com>
|
* @author Alexandre Rosenfeld <alexandre@colosa.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Windows supports both / and \ as path separators, so use the Unix separator
|
// /* Windows supports both / and \ as path separators, so use the Unix separator
|
||||||
* for maximum compatibility.
|
// * for maximum compatibility.
|
||||||
*/
|
// */
|
||||||
define('PATH_SEP', '/');
|
// define('PATH_SEP', '/');
|
||||||
|
//
|
||||||
|
// define('PATH_HOME', WORKFLOW_PATH );
|
||||||
|
// define('PATH_TRUNK', PROCESSMAKER_PATH );
|
||||||
|
// define('PATH_OUTTRUNK', realpath(PROCESSMAKER_PATH.'/..') );
|
||||||
|
//
|
||||||
|
///* Most definitions (including the G class) is done in paths.php
|
||||||
|
// * This mostly simulates a sysGeneric.php call.
|
||||||
|
// */
|
||||||
|
//if (file_exists(PATH_HOME . "engine" . PATH_SEP . "config" . PATH_SEP . "paths_installed.php")) {
|
||||||
|
// require_once(PATH_HOME . "engine" . PATH_SEP . "config" . PATH_SEP . "paths_installed.php");
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//require_once (PATH_HOME . "engine" . PATH_SEP . "config" . PATH_SEP . "paths.php");
|
||||||
|
//
|
||||||
|
//require_once (PATH_THIRDPARTY . "pake" . PATH_SEP . "pakeFunction.php");
|
||||||
|
//require_once (PATH_THIRDPARTY . "pake" . PATH_SEP . "pakeGetopt.class.php");
|
||||||
|
//require_once (PATH_CORE . "config" . PATH_SEP . "environments.php");
|
||||||
|
//require_once (PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "class.system.php");
|
||||||
|
//
|
||||||
|
//require_once (PATH_GULLIVER . "class.bootstrap.php");
|
||||||
|
//
|
||||||
|
//spl_autoload_register(array("Bootstrap", "autoloadClass"));
|
||||||
|
//
|
||||||
|
//Bootstrap::registerSystemClasses();
|
||||||
|
//
|
||||||
|
//$config = System::getSystemConfiguration(PATH_HOME . "engine" . PATH_SEP . "config" . PATH_SEP . "env.ini");
|
||||||
|
//
|
||||||
|
// $e_all = defined('E_DEPRECATED') ? E_ALL & ~E_DEPRECATED : E_ALL;
|
||||||
|
// $e_all = defined('E_STRICT') ? E_ALL & ~E_STRICT : $e_all;
|
||||||
|
// $e_all = $e_all & E_WARNING; // show warning
|
||||||
|
// $e_all = $e_all & ~E_NOTICE; // don't notices
|
||||||
|
//
|
||||||
|
// // Do not change any of these settings directly, use env.ini instead
|
||||||
|
// ini_set('display_errors', $config['debug']);
|
||||||
|
// ini_set('error_reporting', $e_all);
|
||||||
|
// ini_set('short_open_tag', 'On');
|
||||||
|
// ini_set('default_charset', "UTF-8");
|
||||||
|
// ini_set('memory_limit', $config['memory_limit']);
|
||||||
|
// ini_set('soap.wsdl_cache_enabled', $config['wsdl_cache']);
|
||||||
|
// ini_set('date.timezone', $config['time_zone']);
|
||||||
|
//
|
||||||
|
// define ('DEBUG_SQL_LOG', $config['debug_sql']);
|
||||||
|
// define ('DEBUG_TIME_LOG', $config['debug_time']);
|
||||||
|
// define ('DEBUG_CALENDAR_LOG', $config['debug_calendar']);
|
||||||
|
// define ('MEMCACHED_ENABLED', $config['memcached']);
|
||||||
|
// define ('MEMCACHED_SERVER', $config['memcached_server']);
|
||||||
|
// define ('TIME_ZONE', $config['time_zone']);
|
||||||
|
|
||||||
define('PATH_HOME', WORKFLOW_PATH );
|
$rootDir = PROCESSMAKER_PATH;
|
||||||
define('PATH_TRUNK', PROCESSMAKER_PATH );
|
require $rootDir . "framework/src/Maveriks/Util/ClassLoader.php";
|
||||||
define('PATH_OUTTRUNK', realpath(PROCESSMAKER_PATH.'/..') );
|
|
||||||
|
|
||||||
/* Most definitions (including the G class) is done in paths.php
|
$loader = Maveriks\Util\ClassLoader::getInstance();
|
||||||
* This mostly simulates a sysGeneric.php call.
|
$loader->add($rootDir . 'framework/src/', "Maveriks");
|
||||||
*/
|
$loader->add($rootDir . 'workflow/engine/src/', "ProcessMaker");
|
||||||
if (file_exists(PATH_HOME . "engine" . PATH_SEP . "config" . PATH_SEP . "paths_installed.php")) {
|
$loader->add($rootDir . 'workflow/engine/src/');
|
||||||
require_once(PATH_HOME . "engine" . PATH_SEP . "config" . PATH_SEP . "paths_installed.php");
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once (PATH_HOME . "engine" . PATH_SEP . "config" . PATH_SEP . "paths.php");
|
// add vendors to autoloader
|
||||||
|
$loader->add($rootDir . 'vendor/bshaffer/oauth2-server-php/src/', "OAuth2");
|
||||||
|
$loader->addClass("Bootstrap", $rootDir . 'gulliver/system/class.bootstrap.php');
|
||||||
|
|
||||||
require_once (PATH_THIRDPARTY . "pake" . PATH_SEP . "pakeFunction.php");
|
$loader->addModelClassPath($rootDir . "workflow/engine/classes/model/");
|
||||||
require_once (PATH_THIRDPARTY . "pake" . PATH_SEP . "pakeGetopt.class.php");
|
|
||||||
require_once (PATH_CORE . "config" . PATH_SEP . "environments.php");
|
|
||||||
require_once (PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "class.system.php");
|
|
||||||
|
|
||||||
require_once (PATH_GULLIVER . "class.bootstrap.php");
|
$app = new Maveriks\WebApplication();
|
||||||
|
$app->setRootDir($rootDir);
|
||||||
|
$app->loadEnvironment();
|
||||||
|
|
||||||
spl_autoload_register(array("Bootstrap", "autoloadClass"));
|
require PATH_THIRDPARTY . "pake" . PATH_SEP . "pakeFunction.php";
|
||||||
|
require PATH_THIRDPARTY . "pake" . PATH_SEP . "pakeGetopt.class.php";
|
||||||
|
|
||||||
Bootstrap::registerSystemClasses();
|
G::LoadClass("cli");
|
||||||
|
|
||||||
$config = System::getSystemConfiguration(PATH_HOME . "engine" . PATH_SEP . "config" . PATH_SEP . "env.ini");
|
|
||||||
|
|
||||||
$e_all = defined('E_DEPRECATED') ? E_ALL & ~E_DEPRECATED : E_ALL;
|
|
||||||
$e_all = defined('E_STRICT') ? E_ALL & ~E_STRICT : $e_all;
|
|
||||||
$e_all = $e_all & E_WARNING; // show warning
|
|
||||||
$e_all = $e_all & ~E_NOTICE; // don't notices
|
|
||||||
|
|
||||||
// Do not change any of these settings directly, use env.ini instead
|
|
||||||
ini_set('display_errors', $config['debug']);
|
|
||||||
ini_set('error_reporting', $e_all);
|
|
||||||
ini_set('short_open_tag', 'On');
|
|
||||||
ini_set('default_charset', "UTF-8");
|
|
||||||
ini_set('memory_limit', $config['memory_limit']);
|
|
||||||
ini_set('soap.wsdl_cache_enabled', $config['wsdl_cache']);
|
|
||||||
ini_set('date.timezone', $config['time_zone']);
|
|
||||||
|
|
||||||
define ('DEBUG_SQL_LOG', $config['debug_sql']);
|
|
||||||
define ('DEBUG_TIME_LOG', $config['debug_time']);
|
|
||||||
define ('DEBUG_CALENDAR_LOG', $config['debug_calendar']);
|
|
||||||
define ('MEMCACHED_ENABLED', $config['memcached']);
|
|
||||||
define ('MEMCACHED_SERVER', $config['memcached_server']);
|
|
||||||
define ('TIME_ZONE', $config['time_zone']);
|
|
||||||
|
|
||||||
G::LoadClass("cli");
|
|
||||||
|
|
||||||
// trap -V before pake
|
// trap -V before pake
|
||||||
if (in_array('-v', $argv) || in_array('-V', $argv) || in_array('--version', $argv))
|
if (in_array('-v', $argv) || in_array('-V', $argv) || in_array('--version', $argv))
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ CLI::taskDescription(<<<EOT
|
|||||||
EOT
|
EOT
|
||||||
);
|
);
|
||||||
|
|
||||||
CLI::taskRun(runBrowserCacheFiles);
|
CLI::taskRun("runBrowserCacheFiles");
|
||||||
|
|
||||||
function runBrowserCacheFiles($command, $args)
|
function runBrowserCacheFiles($command, $args)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ CLI::taskDescription(<<<EOT
|
|||||||
EOT
|
EOT
|
||||||
);
|
);
|
||||||
|
|
||||||
CLI::taskRun(runHotfixInstall);
|
CLI::taskRun("runHotfixInstall");
|
||||||
|
|
||||||
function runHotfixInstall($command, $args)
|
function runHotfixInstall($command, $args)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ EOT
|
|||||||
);
|
);
|
||||||
CLI::taskArg('plugin', false);
|
CLI::taskArg('plugin', false);
|
||||||
CLI::taskArg('lang', false);
|
CLI::taskArg('lang', false);
|
||||||
CLI::taskRun(run_update);
|
CLI::taskRun("run_update");
|
||||||
|
|
||||||
CLI::taskName('plugins-translation-create');
|
CLI::taskName('plugins-translation-create');
|
||||||
CLI::taskDescription(<<<EOT
|
CLI::taskDescription(<<<EOT
|
||||||
@@ -45,7 +45,7 @@ EOT
|
|||||||
);
|
);
|
||||||
CLI::taskArg('plugin', true);
|
CLI::taskArg('plugin', true);
|
||||||
CLI::taskArg('lang', true);
|
CLI::taskArg('lang', true);
|
||||||
CLI::taskRun(run_create);
|
CLI::taskRun("run_create");
|
||||||
|
|
||||||
|
|
||||||
function run_create($command, $args)
|
function run_create($command, $args)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ CLI::taskDescription(<<<EOT
|
|||||||
EOT
|
EOT
|
||||||
);
|
);
|
||||||
//CLI::taskOpt("minify", "If the option is enabled, performs the build only with minified files", "min", "buildmin");
|
//CLI::taskOpt("minify", "If the option is enabled, performs the build only with minified files", "min", "buildmin");
|
||||||
CLI::taskRun(minify_javascript);
|
CLI::taskRun("minify_javascript");
|
||||||
|
|
||||||
function minify_javascript($command, $args)
|
function minify_javascript($command, $args)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ CLI::taskDescription(<<<EOT
|
|||||||
EOT
|
EOT
|
||||||
);
|
);
|
||||||
CLI::taskOpt("buildACV", "If the option is enabled, performs the Build Cache View.", "ACV", "buildACV");
|
CLI::taskOpt("buildACV", "If the option is enabled, performs the Build Cache View.", "ACV", "buildACV");
|
||||||
CLI::taskRun(run_upgrade);
|
CLI::taskRun("run_upgrade");
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ Print information about the current system and any specified workspaces.
|
|||||||
EOT
|
EOT
|
||||||
);
|
);
|
||||||
CLI::taskArg('workspace-name', true, true);
|
CLI::taskArg('workspace-name', true, true);
|
||||||
CLI::taskRun(run_info);
|
CLI::taskRun("run_info");
|
||||||
|
|
||||||
CLI::taskName('workspace-backup');
|
CLI::taskName('workspace-backup');
|
||||||
CLI::taskDescription(<<<EOT
|
CLI::taskDescription(<<<EOT
|
||||||
@@ -53,7 +53,7 @@ EOT
|
|||||||
CLI::taskArg('workspace', false);
|
CLI::taskArg('workspace', false);
|
||||||
CLI::taskArg('backup-file', true);
|
CLI::taskArg('backup-file', true);
|
||||||
CLI::taskOpt("filesize", "Set the max size of the compressed splitted files, by default the max is 1000 Mb.", "s:","filesize=");
|
CLI::taskOpt("filesize", "Set the max size of the compressed splitted files, by default the max is 1000 Mb.", "s:","filesize=");
|
||||||
CLI::taskRun(run_workspace_backup);
|
CLI::taskRun("run_workspace_backup");
|
||||||
|
|
||||||
CLI::taskName('workspace-restore');
|
CLI::taskName('workspace-restore');
|
||||||
CLI::taskDescription(<<<EOT
|
CLI::taskDescription(<<<EOT
|
||||||
@@ -75,7 +75,7 @@ CLI::taskOpt("multiple", "Restore from multiple compresed enumerated files.", "m
|
|||||||
CLI::taskOpt("workspace", "Select which workspace to restore if multiple workspaces are present in the archive.",
|
CLI::taskOpt("workspace", "Select which workspace to restore if multiple workspaces are present in the archive.",
|
||||||
"w:", "workspace=");
|
"w:", "workspace=");
|
||||||
CLI::taskOpt("lang", "You must specify language on which rebuild of the case cache list builder will be done; if you don't specify this, it will use 'en' by default", "l:","lang=");
|
CLI::taskOpt("lang", "You must specify language on which rebuild of the case cache list builder will be done; if you don't specify this, it will use 'en' by default", "l:","lang=");
|
||||||
CLI::taskRun(run_workspace_restore);
|
CLI::taskRun("run_workspace_restore");
|
||||||
|
|
||||||
CLI::taskName('cacheview-repair');
|
CLI::taskName('cacheview-repair');
|
||||||
CLI::taskDescription(<<<EOT
|
CLI::taskDescription(<<<EOT
|
||||||
@@ -93,7 +93,7 @@ EOT
|
|||||||
);
|
);
|
||||||
CLI::taskArg('workspace', true, true);
|
CLI::taskArg('workspace', true, true);
|
||||||
CLI::taskOpt("lang", "You must specify language on which rebuild of the case cache list builder will be done; if you don't specify this, it will use 'en' by default", "l:","lang=");
|
CLI::taskOpt("lang", "You must specify language on which rebuild of the case cache list builder will be done; if you don't specify this, it will use 'en' by default", "l:","lang=");
|
||||||
CLI::taskRun(run_cacheview_upgrade);
|
CLI::taskRun("run_cacheview_upgrade");
|
||||||
|
|
||||||
CLI::taskName('database-upgrade');
|
CLI::taskName('database-upgrade');
|
||||||
CLI::taskDescription(<<<EOT
|
CLI::taskDescription(<<<EOT
|
||||||
@@ -110,7 +110,7 @@ CLI::taskDescription(<<<EOT
|
|||||||
EOT
|
EOT
|
||||||
);
|
);
|
||||||
CLI::taskArg('workspace', true, true);
|
CLI::taskArg('workspace', true, true);
|
||||||
CLI::taskRun(run_database_upgrade);
|
CLI::taskRun("run_database_upgrade");
|
||||||
|
|
||||||
CLI::taskName('plugins-database-upgrade');
|
CLI::taskName('plugins-database-upgrade');
|
||||||
CLI::taskDescription(<<<EOT
|
CLI::taskDescription(<<<EOT
|
||||||
@@ -125,7 +125,7 @@ CLI::taskDescription(<<<EOT
|
|||||||
EOT
|
EOT
|
||||||
);
|
);
|
||||||
CLI::taskArg('workspace', true, true);
|
CLI::taskArg('workspace', true, true);
|
||||||
CLI::taskRun(run_plugins_database_upgrade);
|
CLI::taskRun("run_plugins_database_upgrade");
|
||||||
|
|
||||||
CLI::taskName('workspace-upgrade');
|
CLI::taskName('workspace-upgrade');
|
||||||
CLI::taskDescription(<<<EOT
|
CLI::taskDescription(<<<EOT
|
||||||
@@ -143,7 +143,7 @@ CLI::taskDescription(<<<EOT
|
|||||||
EOT
|
EOT
|
||||||
);
|
);
|
||||||
CLI::taskArg('workspace-name', true, true);
|
CLI::taskArg('workspace-name', true, true);
|
||||||
CLI::taskRun(run_workspace_upgrade);
|
CLI::taskRun("run_workspace_upgrade");
|
||||||
|
|
||||||
CLI::taskName('translation-repair');
|
CLI::taskName('translation-repair');
|
||||||
CLI::taskDescription(<<<EOT
|
CLI::taskDescription(<<<EOT
|
||||||
@@ -158,7 +158,7 @@ CLI::taskDescription(<<<EOT
|
|||||||
EOT
|
EOT
|
||||||
);
|
);
|
||||||
CLI::taskArg('workspace-name', true, true);
|
CLI::taskArg('workspace-name', true, true);
|
||||||
CLI::taskRun(run_translation_upgrade);
|
CLI::taskRun("run_translation_upgrade");
|
||||||
|
|
||||||
CLI::taskName('migrate-cases-folders');
|
CLI::taskName('migrate-cases-folders');
|
||||||
CLI::taskDescription(<<<EOT
|
CLI::taskDescription(<<<EOT
|
||||||
@@ -170,7 +170,7 @@ EOT
|
|||||||
//CLI::taskArg('workspace', true);
|
//CLI::taskArg('workspace', true);
|
||||||
CLI::taskOpt("workspace", "Select which workspace to migrate the cases folders, if multiple workspaces are present in the server.",
|
CLI::taskOpt("workspace", "Select which workspace to migrate the cases folders, if multiple workspaces are present in the server.",
|
||||||
"w:", "workspace=");
|
"w:", "workspace=");
|
||||||
CLI::taskRun(runStructureDirectories);
|
CLI::taskRun("runStructureDirectories");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function run_info
|
* Function run_info
|
||||||
|
|||||||
Reference in New Issue
Block a user