Conflicts

This commit is contained in:
Paula Quispe
2017-10-19 17:56:01 -04:00
159 changed files with 536 additions and 476 deletions

View File

@@ -239,11 +239,10 @@ class PmBootstrap extends Bootstrap
public function initPropel($sys = '')
{
if (empty($sys)) {
if (! defined(SYS_SYS)) {
throw new Exception("Error: Undefined syemtem env. constant 'SYS_SYS'");
$sys = config("system.workspace");
if (empty($sys)) {
throw new Exception("Error: Undefined system environment (workspace).");
}
$sys = SYS_SYS;
}
// setup propel definitions and logging

View File

@@ -132,12 +132,13 @@ try {
if (is_dir(PATH_DB . $workspace) && file_exists(PATH_DB . $workspace . PATH_SEP . 'db.php')) {
define('SYS_SYS', $workspace);
config(["system.workspace" => $workspace]);
include_once(PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths_installed.php');
include_once(PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths.php');
//PM Paths DATA
define('PATH_DATA_SITE', PATH_DATA . 'sites/' . SYS_SYS . '/');
define('PATH_DATA_SITE', PATH_DATA . 'sites/' . config("system.workspace") . '/');
define('PATH_DOCUMENT', PATH_DATA_SITE . 'files/');
define('PATH_DATA_MAILTEMPLATES', PATH_DATA_SITE . 'mailTemplates/');
define('PATH_DATA_PUBLIC', PATH_DATA_SITE . 'public/');
@@ -417,7 +418,7 @@ function executePlugins()
}
if ($handle = opendir($pathCronPlugins)) {
setExecutionMessage('Executing cron files in bin/plugins directory in Workspace: ' . SYS_SYS);
setExecutionMessage('Executing cron files in bin/plugins directory in Workspace: ' . config("system.workspace"));
while (false !== ($file = readdir($handle))) {
if (strpos($file, '.php',1) && is_file($pathCronPlugins . $file)) {
$filename = str_replace('.php' , '', $file);
@@ -437,7 +438,7 @@ function executePlugins()
// -> Execute functions
if (!empty($cronFiles)) {
setExecutionMessage('Executing registered cron files for Workspace: ' . SYS_SYS);
setExecutionMessage('Executing registered cron files for Workspace: ' . config("system.workspace"));
foreach($cronFiles as $cronFile) {
executeCustomCronFunction(PATH_PLUGINS . $cronFile->namespace . PATH_SEP . 'bin' . PATH_SEP . $cronFile->cronFile . '.php', $cronFile->cronFile);
}
@@ -819,7 +820,7 @@ function executeCaseSelfService()
unset($appFields['APP_PIN']);
$case->updateCase($appFields["APP_UID"], $appFields);
saveLog("unassignedCase", "action", "OK Executed tigger to the case $appcacheAppNumber");
saveLog("unassignedCase", "action", "OK Executed trigger to the case $appcacheAppNumber");
}
}

View File

@@ -128,7 +128,7 @@ print "PATH_DB: " . PATH_DB . "\n";
print "PATH_CORE: " . PATH_CORE . "\n";
// define the site name (instance name)
if (! defined ('SYS_SYS')) {
if (empty(config("system.workspace"))) {
$sObject = $workspaceName;
$sNow = ''; // $argv[2];
$sFilter = '';
@@ -144,11 +144,12 @@ if (! defined ('SYS_SYS')) {
if (file_exists (PATH_DB . $sObject . PATH_SEP . 'db.php')) {
define ('SYS_SYS', $sObject);
config(["system.workspace" => $sObject]);
// ****************************************
// read initialize file
require_once PATH_HOME . 'engine' . PATH_SEP . 'classes' . PATH_SEP . 'class.system.php';
$config = System::getSystemConfiguration ('', '', SYS_SYS);
$config = System::getSystemConfiguration ('', '', config("system.workspace"));
define ('MEMCACHED_ENABLED', $config ['memcached']);
define ('MEMCACHED_SERVER', $config ['memcached_server']);
define ('TIME_ZONE', $config ['time_zone']);
@@ -170,7 +171,7 @@ if (! defined ('SYS_SYS')) {
include_once (PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths.php');
// ***************** PM Paths DATA **************************
define ('PATH_DATA_SITE', PATH_DATA . 'sites/' . SYS_SYS . '/');
define ('PATH_DATA_SITE', PATH_DATA . 'sites/' . config("system.workspace") . '/');
define ('PATH_DOCUMENT', PATH_DATA_SITE . 'files/');
define ('PATH_DATA_MAILTEMPLATES', PATH_DATA_SITE . 'mailTemplates/');
define ('PATH_DATA_PUBLIC', PATH_DATA_SITE . 'public/');
@@ -264,7 +265,7 @@ function processWorkspace()
try {
if (($solrConf = System::solrEnv (SYS_SYS)) !== false) {
if (($solrConf = System::solrEnv (config("system.workspace"))) !== false) {
print "Solr Configuration file: " . PATH_DATA_SITE . "env.ini\n";
print "solr_enabled: " . $solrConf ['solr_enabled'] . "\n";
print "solr_host: " . $solrConf ['solr_host'] . "\n";

View File

@@ -46,11 +46,12 @@ function run_addon_core_install($args)
$storeId = $args[1];
$addonName = $args[2];
if (!defined("SYS_SYS")) {
if (empty(config("system.workspace"))) {
define("SYS_SYS", $workspace);
config(["system.workspace" => $workspace]);
}
if (!defined("PATH_DATA_SITE")) {
define("PATH_DATA_SITE", PATH_DATA . "sites/" . SYS_SYS . "/");
define("PATH_DATA_SITE", PATH_DATA . "sites/" . config("system.workspace") . "/");
}
if (!defined("DB_ADAPTER")) {
define("DB_ADAPTER", $args[3]);
@@ -102,11 +103,12 @@ function change_hash($command, $opts)
$response = new stdclass();
$response->workspace = $workspace;
$response->hash = $hash;
if (!defined("SYS_SYS")) {
if (empty(config("system.workspace"))) {
define("SYS_SYS", $workspace->name);
config(["system.workspace" => $workspace->name]);
}
if (!defined("PATH_DATA_SITE")) {
define("PATH_DATA_SITE", PATH_DATA . "sites/" . SYS_SYS . "/");
define("PATH_DATA_SITE", PATH_DATA . "sites/" . config("system.workspace") . "/");
}
$_SESSION['__sw__'] = '';
if (!$workspace->changeHashPassword($workspace->name, $response)) {

View File

@@ -132,12 +132,13 @@ function run_upgrade($command, $args)
$flagUpdateXml = !array_key_exists('noxml', $args);
foreach ($workspaces as $index => $workspace) {
if (!defined("SYS_SYS")) {
if (empty(config("system.workspace"))) {
define("SYS_SYS", $workspace->name);
config(["system.workspace" => $workspace->name]);
}
if (!defined("PATH_DATA_SITE")) {
define("PATH_DATA_SITE", PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP);
define("PATH_DATA_SITE", PATH_DATA . "sites" . PATH_SEP . config("system.workspace") . PATH_SEP);
}
if(!defined('DB_ADAPTER')) {

View File

@@ -358,12 +358,13 @@ function run_workspace_upgrade($args, $opts)
foreach ($workspaces as $workspace) {
try {
if (!defined("SYS_SYS")) {
if (empty(config("system.workspace"))) {
define("SYS_SYS", $workspace->name);
config(["system.workspace" => $workspace->name]);
}
if (!defined("PATH_DATA_SITE")) {
define("PATH_DATA_SITE", PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP);
define("PATH_DATA_SITE", PATH_DATA . "sites" . PATH_SEP . config("system.workspace") . PATH_SEP);
}
$workspace->upgrade($buildCacheView, $workspace->name, false, $lang, ['updateXml' => $flagUpdateXml, 'updateMafe' => $first]);

View File

@@ -98,7 +98,7 @@ print "PATH_DB: " . PATH_DB . "\n";
print "PATH_CORE: " . PATH_CORE . "\n";
// define the site name (instance name)
if (! defined ('SYS_SYS')) {
if (empty(config("system.workspace"))) {
$sObject = $workspaceName;
$sNow = ''; // $argv[2];
/*
@@ -115,11 +115,12 @@ if (! defined ('SYS_SYS')) {
if (file_exists (PATH_DB . $sObject . PATH_SEP . 'db.php')) {
define ('SYS_SYS', $sObject);
config(["system.workspace" => $sObject]);
// ****************************************
// read initialize file
require_once PATH_HOME . 'engine' . PATH_SEP . 'classes' . PATH_SEP . 'class.system.php';
$config = System::getSystemConfiguration ('', '', SYS_SYS);
$config = System::getSystemConfiguration ('', '', config("system.workspace"));
define ('MEMCACHED_ENABLED', $config ['memcached']);
define ('MEMCACHED_SERVER', $config ['memcached_server']);
define ('TIME_ZONE', $config ['time_zone']);
@@ -142,7 +143,7 @@ if (! defined ('SYS_SYS')) {
print "MEMCACHED_SERVER: " . $MEMCACHED_SERVER . "\n";
// ***************** PM Paths DATA **************************
define ('PATH_DATA_SITE', PATH_DATA . 'sites/' . SYS_SYS . '/');
define ('PATH_DATA_SITE', PATH_DATA . 'sites/' . config("system.workspace") . '/');
define ('PATH_DOCUMENT', PATH_DATA_SITE . 'files/');
define ('PATH_DATA_MAILTEMPLATES', PATH_DATA_SITE . 'mailTemplates/');
define ('PATH_DATA_PUBLIC', PATH_DATA_SITE . 'public/');
@@ -337,7 +338,7 @@ function displayMissingCases($aAppUidsDB, $aAppUidsSolr)
function getListUids($usrUid, $action)
{
if (($solrConf = System::solrEnv (SYS_SYS)) !== false) {
if (($solrConf = System::solrEnv (config("system.workspace"))) !== false) {
print "Solr Configuration file: " . PATH_DATA_SITE . "env.ini\n";
print "solr_enabled: " . $solrConf ['solr_enabled'] . "\n";

View File

@@ -160,7 +160,7 @@ class ActionsByEmailCoreClass extends PMPlugin
if (!empty($envPort) && strpos($envHost, $envPort) === false) {
$envHost = $envHost . $envPort;
}
$link = (G::is_https() || $envProtocol ? 'https://' : 'http://') . $envHost . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . $envSkin . '/services/ActionsByEmail';
$link = (G::is_https() || $envProtocol ? 'https://' : 'http://') . $envHost . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . $envSkin . '/services/ActionsByEmail';
switch ($configuration['ABE_TYPE']) {
case 'CUSTOM':

View File

@@ -110,8 +110,10 @@ class Applications
$sqlData .= " AND APPLICATION.APP_STATUS = 'TO_DO'";
break;
default: //All status
//When the status is TO_DO, we will get all the open threads
$sqlData .= " AND (APP_DELEGATION.DEL_THREAD_STATUS = 'OPEN' ";
$sqlData .= " OR (APP_DELEGATION.DEL_THREAD_STATUS = 'CLOSED' AND APP_DELEGATION.DEL_LAST_INDEX = 1)) ";
//When the status is COMPLETED, we will get the last task that with completed the case
$sqlData .= " OR (APP_DELEGATION.DEL_THREAD_STATUS = 'CLOSED' AND APP_DELEGATION.DEL_LAST_INDEX = 1 AND APPLICATION.APP_STATUS_ID = 3)) ";
break;
}
@@ -703,7 +705,7 @@ class Applications
$tableName = implode( '', $newTableName );
// so the pm table class can be invoqued from the pm table model clases
if (! class_exists( $tableName )) {
require_once (PATH_DB . SYS_SYS . PATH_SEP . "classes" . PATH_SEP . $tableName . ".php");
require_once (PATH_DB . config("system.workspace") . PATH_SEP . "classes" . PATH_SEP . $tableName . ".php");
}
}
$totalCount = AppCacheViewPeer::doCount($CriteriaCount, $distinct);

View File

@@ -1068,7 +1068,7 @@ class Cases
$oDerivation->verifyIsCaseChild($sAppUid);
}
} catch (Exception $e) {
Bootstrap::registerMonolog('DeleteCases', 200, 'Error in sub-process when trying to route a child case related to the case', ['application_uid' => $sAppUid, 'error' => $e->getMessage()], SYS_SYS, 'processmaker.log');
Bootstrap::registerMonolog('DeleteCases', 200, 'Error in sub-process when trying to route a child case related to the case', ['application_uid' => $sAppUid, 'error' => $e->getMessage()], config("system.workspace"), 'processmaker.log');
}
//Delete the registries in the table SUB_APPLICATION
@@ -2211,7 +2211,7 @@ class Cases
"delIndex" => $iDelIndex,
"appInitDate" => $Fields['APP_INIT_DATE']
];
Bootstrap::registerMonolog('CreateCase', 200, "Create case", $data, SYS_SYS, 'processmaker.log');
Bootstrap::registerMonolog('CreateCase', 200, "Create case", $data, config("system.workspace"), 'processmaker.log');
//call plugin
if (class_exists('folderData')) {
@@ -3375,7 +3375,7 @@ class Cases
$oPMScript->setFields($aFields);
/*----------------------------------********---------------------------------*/
$cs = new CodeScanner(SYS_SYS);
$cs = new CodeScanner(config("system.workspace"));
$strFoundDisabledCode = "";
/*----------------------------------********---------------------------------*/

View File

@@ -146,7 +146,7 @@ class ConsolidatedCases
}
$sClassName = $TableName;
$sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
@unlink($sPath . $sClassName . '.php');
@unlink($sPath . $sClassName . 'Peer.php');

View File

@@ -856,7 +856,7 @@ class Derivation
*/
function derivate(array $currentDelegation, array $nextDelegations, $removeList = true)
{
$this->sysSys = (defined("SYS_SYS"))? SYS_SYS : "Undefined";
$this->sysSys = (!empty(config("system.workspace")))? config("system.workspace") : "Undefined";
$this->context = Bootstrap::getDefaultContextLog();
$aContext = $this->context;
$this->removeList = $removeList;

View File

@@ -101,11 +101,11 @@ class EnterpriseClass extends PMPlugin
{
$oServerConf = &ServerConf::getSingleton();
$infoLicense =$oServerConf->getProperty('LICENSE_INFO');
if (isset($infoLicense[SYS_SYS]['LIMIT_USERS'])) {
if (isset($infoLicense[config("system.workspace")]['LIMIT_USERS'])) {
$criteria = new Criteria('workflow');
$criteria->add(UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL);
$count = UsersPeer::doCount($criteria);
if ($count >= $infoLicense[SYS_SYS]['LIMIT_USERS'] ) {
if ($count >= $infoLicense[config("system.workspace")]['LIMIT_USERS'] ) {
throw new Exception("You can\'t add more users to the System, this reach the limit of allowed users by license that it has installed now");
}
}

View File

@@ -650,7 +650,7 @@ class IndicatorsCalculator
}
private function pdoConnection() {
$currentWS = defined('SYS_SYS') ? SYS_SYS : 'Wokspace Undefined';
$currentWS = !empty(config("system.workspace")) ? config("system.workspace") : 'Wokspace Undefined';
$workSpace = new WorkspaceTools($currentWS);
$arrayHost = explode(':', $workSpace->dbHost);
$host = "host=".$arrayHost[0];

View File

@@ -470,7 +470,7 @@ class LdapAdvanced
}
//log format: date hour ipaddress workspace ldapErrorNr
fwrite($fpt, sprintf("%s %s %s %s %s \n", date("Y-m-d H:i:s"), getenv("REMOTE_ADDR"), SYS_SYS, $ldapErrorNr, $text));
fwrite($fpt, sprintf("%s %s %s %s %s \n", date("Y-m-d H:i:s"), getenv("REMOTE_ADDR"), config("system.workspace"), $ldapErrorNr, $text));
fclose($fpt);
} else {
error_log("file $logFile is not writable ");

View File

@@ -337,7 +337,7 @@ class PMLicensedFeatures
/*----------------------------------********---------------------------------*/
public function verifyfeature ($featureName)
{
$cached = Cache::get(PmLicenseManager::CACHE_KEY . '.' . SYS_SYS, []);
$cached = Cache::get(PmLicenseManager::CACHE_KEY . '.' . config("system.workspace"), []);
if (isset($cached[$featureName])) {
return $cached[$featureName];
}
@@ -360,7 +360,7 @@ class PMLicensedFeatures
$this->featuresDetails[$value[0]]->enabled = $enable;
$cached[$featureName] = $enable;
Cache::put(PmLicenseManager::CACHE_KEY . '.' . SYS_SYS, $cached, Carbon::now()->addDay(1));
Cache::put(PmLicenseManager::CACHE_KEY . '.' . config("system.workspace"), $cached, Carbon::now()->addDay(1));
return $enable;
}

View File

@@ -1103,7 +1103,7 @@ class PMPluginRegistry
try {
$iPlugins = 0;
$oServerConf = & ServerConf::getSingleton();
$oServerConf->addPlugin( SYS_SYS, $this->_aPluginDetails );
$oServerConf->addPlugin( config("system.workspace"), $this->_aPluginDetails );
foreach ($this->_aPluginDetails as $namespace => $detail) {
if (isset( $detail->enabled ) && $detail->enabled) {
if (! empty( $detail->sFilename ) && file_exists( $detail->sFilename )) {

View File

@@ -31,7 +31,7 @@ class PmDrive extends PmGoogleApi
$this->folderIdPMDrive = empty($dataUser['USR_PMDRIVE_FOLDER_UID']) ? '' : $dataUser['USR_PMDRIVE_FOLDER_UID'];
$conf = $this->getConfigGmail();
$this->folderNamePMDrive = empty($conf->aConfig['folderNamePMDrive']) ? 'PMDrive (' . SYS_SYS . ')' : $conf->aConfig['folderNamePMDrive'];
$this->folderNamePMDrive = empty($conf->aConfig['folderNamePMDrive']) ? 'PMDrive (' . config("system.workspace") . ')' : $conf->aConfig['folderNamePMDrive'];
if ($this->folderIdPMDrive == '') {
$folderid = $this->createFolder($this->folderNamePMDrive);

View File

@@ -35,7 +35,7 @@ class PmDynaform
public function __construct($fields = array())
{
$this->sysSys = (defined("SYS_SYS")) ? SYS_SYS : "Undefined";
$this->sysSys = (!empty(config("system.workspace"))) ? config("system.workspace") : "Undefined";
$this->context = \Bootstrap::getDefaultContextLog();
$this->dataSources = array("database", "dataVariable");
$this->pathRTLCss = '/lib/pmdynaform/build/css/PMDynaform-rtl.css';
@@ -1007,7 +1007,7 @@ class PmDynaform
var app_uid = \"" . $this->fields["APP_UID"] . "\";
var prj_uid = \"" . $this->fields["PRO_UID"] . "\";
var step_mode = \"\";
var workspace = \"" . SYS_SYS . "\";
var workspace = \"" . config("system.workspace") . "\";
var credentials = " . G::json_encode($this->credentials) . ";
var filePost = \"\";
var fieldsRequired = null;
@@ -1068,7 +1068,7 @@ class PmDynaform
"var app_uid = '" . $this->fields["APP_UID"] . "';\n" .
"var prj_uid = '" . $this->fields["PRO_UID"] . "';\n" .
"var step_mode = null;\n" .
"var workspace = '" . SYS_SYS . "';\n" .
"var workspace = '" . config("system.workspace") . "';\n" .
"var credentials = " . G::json_encode($this->credentials) . ";\n" .
"var filePost = null;\n" .
"var fieldsRequired = null;\n" .
@@ -1147,7 +1147,7 @@ class PmDynaform
"var app_uid = '" . $this->fields["APP_UID"] . "';\n" .
"var prj_uid = '" . $this->fields["PRO_UID"] . "';\n" .
"var step_mode = '" . $this->fields["STEP_MODE"] . "';\n" .
"var workspace = '" . SYS_SYS . "';\n" .
"var workspace = '" . config("system.workspace") . "';\n" .
"var credentials = " . G::json_encode($this->credentials) . ";\n" .
"var filePost = null;\n" .
"var fieldsRequired = null;\n" .
@@ -1204,7 +1204,7 @@ class PmDynaform
var app_uid = \"" . $this->fields["APP_UID"] . "\";
var prj_uid = \"" . $this->fields["PRO_UID"] . "\";
var step_mode = null;
var workspace = \"" . SYS_SYS . "\";
var workspace = \"" . config("system.workspace") . "\";
var credentials = " . G::json_encode($this->credentials) . ";
var filePost = \"cases_SaveDataSupervisor?UID=" . $this->fields["CURRENT_DYNAFORM"] . "\";
var fieldsRequired = null;
@@ -1248,7 +1248,7 @@ class PmDynaform
"var app_uid = null;\n" .
"var prj_uid = '" . $this->record["PRO_UID"] . "';\n" .
"var step_mode = null;\n" .
"var workspace = '" . SYS_SYS . "';\n" .
"var workspace = '" . config("system.workspace") . "';\n" .
"var credentials = " . G::json_encode($this->credentials) . ";\n" .
"var filePost = '" . $filename . "';\n" .
"var fieldsRequired = " . G::json_encode(array()) . ";\n" .
@@ -1290,7 +1290,7 @@ class PmDynaform
"var app_uid = '" . G::decrypt($record['APP_UID'], URL_KEY) . "';\n" .
"var prj_uid = '" . $this->record["PRO_UID"] . "';\n" .
"var step_mode = null;\n" .
"var workspace = '" . SYS_SYS . "';\n" .
"var workspace = '" . config("system.workspace") . "';\n" .
"var credentials = " . G::json_encode($this->credentials) . ";\n" .
"var filePost = '" . $filename . "';\n" .
"var fieldsRequired = " . G::json_encode(array()) . ";\n" .
@@ -1354,7 +1354,7 @@ class PmDynaform
"var app_uid = null;\n" .
"var prj_uid = '" . $this->record["PRO_UID"] . "';\n" .
"var step_mode = null;\n" .
"var workspace = '" . SYS_SYS . "';\n" .
"var workspace = '" . config("system.workspace") . "';\n" .
"var credentials = " . G::json_encode($this->credentials) . ";\n" .
"var fieldsRequired = " . G::json_encode(array()) . ";\n" .
"var triggerDebug = null;\n" .
@@ -2100,7 +2100,7 @@ class PmDynaform
400,
'JSON encoded string error ' . $jsonLastError . ': ' . $jsonLastErrorMsg,
['token' => $token, 'projectUid' => $this->record['PRO_UID'], 'dynaFormUid' => $this->record['DYN_UID']],
SYS_SYS,
config("system.workspace"),
'processmaker.log'
);
}

View File

@@ -26,11 +26,11 @@ class PmLicenseManager
$activeLicenseSetting = $oServerConf->getProperty('ACTIVE_LICENSE');
if ((isset($activeLicenseSetting[SYS_SYS])) && (file_exists($activeLicenseSetting[SYS_SYS]))) {
$licenseFile = $activeLicenseSetting[SYS_SYS];
if ((isset($activeLicenseSetting[config("system.workspace")])) && (file_exists($activeLicenseSetting[config("system.workspace")]))) {
$licenseFile = $activeLicenseSetting[config("system.workspace")];
} else {
$activeLicense = $this->getActiveLicense();
$oServerConf->setProperty('ACTIVE_LICENSE', [SYS_SYS => $activeLicense['LICENSE_PATH']]);
$oServerConf->setProperty('ACTIVE_LICENSE', [config("system.workspace") => $activeLicense['LICENSE_PATH']]);
$licenseFile = $activeLicense['LICENSE_PATH'];
}
@@ -77,7 +77,7 @@ class PmLicenseManager
$this->supportEndDate = date("Y-m-d H:i:s", strtotime($this->supportEndDate));
$conf = new Configurations();
if (defined('SYS_SYS') && $conf->exists("ENVIRONMENT_SETTINGS")) {
if (!empty(config("system.workspace")) && $conf->exists("ENVIRONMENT_SETTINGS")) {
$this->supportStartDate = $conf->getSystemDate($this->supportStartDate);
$this->supportEndDate = $conf->getSystemDate($this->supportEndDate);
} else {
@@ -103,14 +103,14 @@ class PmLicenseManager
$licInfoA = $oServerConf->getProperty('LICENSE_INFO');
// The HUMAN attribute varies according to the timezone configured in the server, therefore it does not need
// to be considered in the comparison if the value was changed or not, it is only comparing with te "timestamp"
if (isset($licInfoA[SYS_SYS]['date']['HUMAN'])) {
unset($licInfoA[SYS_SYS]['date']['HUMAN']);
if (isset($licInfoA[config("system.workspace")]['date']['HUMAN'])) {
unset($licInfoA[config("system.workspace")]['date']['HUMAN']);
}
} else {
$licInfoA = [];
}
if (empty($licInfoA[SYS_SYS]) || ($licInfoA[SYS_SYS] != $resultsRegister)) {
$licInfoA[SYS_SYS] = $resultsRegister;
if (empty($licInfoA[config("system.workspace")]) || ($licInfoA[config("system.workspace")] != $resultsRegister)) {
$licInfoA[config("system.workspace")] = $resultsRegister;
$oServerConf->setProperty('LICENSE_INFO', $licInfoA);
}
}
@@ -337,11 +337,11 @@ class PmLicenseManager
}
if (class_exists('pmTrialPlugin')) {
$linkText = $linkText . "<a href='/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/pmTrial/services/buyNow?n=true" . "'> <img align='absmiddle' src='/plugin/pmLicenseManager/btn_buy_now.gif' border='0' /></a>";
$linkText = $linkText . "<a href='/sys" . config("system.workspace") . "/" . SYS_LANG . "/" . SYS_SKIN . "/pmTrial/services/buyNow?n=true" . "'> <img align='absmiddle' src='/plugin/pmLicenseManager/btn_buy_now.gif' border='0' /></a>";
}
if (isset($_SESSION["__ENTERPRISE_SYSTEM_UPDATE__"]) && $_SESSION["__ENTERPRISE_SYSTEM_UPDATE__"] == 1) {
$aOnclick = "onclick=\"this.href='" . EnterpriseUtils::getUrlServerName() . "/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/setup/main?s=PMENTERPRISE';\"";
$aOnclick = "onclick=\"this.href='" . EnterpriseUtils::getUrlServerName() . "/sys" . config("system.workspace") . "/" . SYS_LANG . "/" . SYS_SKIN . "/setup/main?s=PMENTERPRISE';\"";
if (EnterpriseUtils::skinIsUx() == 1) {
$aOnclick = "onclick=\"Ext.ComponentMgr.get('mainTabPanel').setActiveTab('pm-option-setup'); Ext.ComponentMgr.get('pm-option-setup').setLocation(Ext.ComponentMgr.get('pm-option-setup').defaultSrc + 's=PMENTERPRISE', true); return (false);\"";
}
@@ -385,7 +385,7 @@ class PmLicenseManager
} else {
$oServerConf = &ServerConf::getSingleton();
$oServerConf->setProperty('ACTIVE_LICENSE', [SYS_SYS => $path]);
$oServerConf->setProperty('ACTIVE_LICENSE', [config("system.workspace") => $path]);
$this->saveDataLicense($results, $path, $redirect);
if ($redirect) {
G::Header('location: ../enterprise/addonsStore');
@@ -482,7 +482,7 @@ class PmLicenseManager
$tr->setLicenseType($LicenseType);
$res = $tr->save();
Cache::forget(PmLicenseManager::CACHE_KEY . '.' . SYS_SYS);
Cache::forget(PmLicenseManager::CACHE_KEY . '.' . config("system.workspace"));
} catch (Exception $e) {
G::pr($e);
}

View File

@@ -212,7 +212,7 @@ class PmTable
}
$this->schemaFilename = 'schema.xml';
$this->baseDir = PATH_DB . SYS_SYS . PATH_SEP;
$this->baseDir = PATH_DB . config("system.workspace") . PATH_SEP;
$this->targetDir = $this->baseDir . 'pmt-propel' . PATH_SEP . $this->dataSource . PATH_SEP;
$this->configDir = $this->targetDir . 'config' . PATH_SEP;
$this->dataDir = $this->targetDir . 'data' . PATH_SEP;

View File

@@ -2755,7 +2755,7 @@ class ProcessMap
$http = 'http://';
}
$link = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/' . $sProcessUID . '/';
$link = $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/' . $sProcessUID . '/';
$row = array();
$c = 0;
@@ -2767,8 +2767,8 @@ class ProcessMap
$TaskFields['TAS_ASSIGN_TYPE'] = '';
$row[] = array('W_TITLE' => '', 'W_DELETE' => '', 'TAS_ASSIGN_TYPE' => $TaskFields['TAS_ASSIGN_TYPE'] );
if (is_dir(PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "public" . PATH_SEP . $sProcessUID)) {
$dir = opendir(PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "public" . PATH_SEP . $sProcessUID);
if (is_dir(PATH_DATA . "sites" . PATH_SEP . config("system.workspace") . PATH_SEP . "public" . PATH_SEP . $sProcessUID)) {
$dir = opendir(PATH_DATA . "sites" . PATH_SEP . config("system.workspace") . PATH_SEP . "public" . PATH_SEP . $sProcessUID);
while ($archivo = readdir($dir)) {
//print $archivo." **** <hr>";
if ($archivo != '.') {
@@ -3115,7 +3115,7 @@ class ProcessMap
public function listNoProcessesUser($sProcessUID)
{
$memcache = & PMmemcached::getSingleton(SYS_SYS);
$memcache = & PMmemcached::getSingleton(config("system.workspace"));
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(ProcessUserPeer::USR_UID);
@@ -4777,7 +4777,7 @@ class ProcessMap
$http = 'http://';
}
$link = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/' . $sProcessUID . '/';
$link = $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/' . $sProcessUID . '/';
$row = array();
$c = 0;
@@ -4790,8 +4790,8 @@ class ProcessMap
//$row [] = array ('W_TITLE' => '', 'W_DELETE' => '', 'TAS_ASSIGN_TYPE' => $TaskFields ['TAS_ASSIGN_TYPE'] );
if (is_dir(PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "public" . PATH_SEP . $sProcessUID)) {
$dir = opendir(PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "public" . PATH_SEP . $sProcessUID);
if (is_dir(PATH_DATA . "sites" . PATH_SEP . config("system.workspace") . PATH_SEP . "public" . PATH_SEP . $sProcessUID)) {
$dir = opendir(PATH_DATA . "sites" . PATH_SEP . config("system.workspace") . PATH_SEP . "public" . PATH_SEP . $sProcessUID);
$dynTitle = str_replace(' ', '_', str_replace('/', '_', $dynTitle));
$arlink = $link . $dynTitle . '.php';
//$arlink = "<a href='" . $alink . "' target='blank'><font color='#9999CC'>" . $alink . "</font></a>";
@@ -5812,7 +5812,7 @@ class ProcessMap
public function listExtNoProcessesUser($sProcessUID)
{
$memcache = & PMmemcached::getSingleton(SYS_SYS);
$memcache = & PMmemcached::getSingleton(config("system.workspace"));
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(ProcessUserPeer::USR_UID);

View File

@@ -4131,7 +4131,7 @@ class Processes
try {
$result = $scriptTask->create($processUid, $record);
} catch (Exception $e) {
Bootstrap::registerMonolog('DataError', 400, $e->getMessage(), $record, SYS_SYS, 'processmaker.log');
Bootstrap::registerMonolog('DataError', 400, $e->getMessage(), $record, config("system.workspace"), 'processmaker.log');
}
}
} catch (Exception $e) {
@@ -4499,7 +4499,7 @@ class Processes
$proTitle = (substr(G::inflect($data->process['PRO_TITLE']), 0, 245));
$proTitle = preg_replace("/[^A-Za-z0-9_]/", "", $proTitle);
//Calculating the maximum length of file name
$pathLength = strlen(PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "files" . PATH_SEP . "output" . PATH_SEP);
$pathLength = strlen(PATH_DATA . "sites" . PATH_SEP . config("system.workspace") . PATH_SEP . "files" . PATH_SEP . "output" . PATH_SEP);
$length = strlen($proTitle) + $pathLength;
$limit = 200;
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
@@ -4578,7 +4578,7 @@ class Processes
// for mailtemplates files
$MAILS_ROOT_PATH = PATH_DATA . 'sites' . PATH_SEP . SYS_SYS . PATH_SEP . 'mailTemplates' . PATH_SEP . $data->process['PRO_UID'];
$MAILS_ROOT_PATH = PATH_DATA . 'sites' . PATH_SEP . config("system.workspace") . PATH_SEP . 'mailTemplates' . PATH_SEP . $data->process['PRO_UID'];
$isMailTempSent = false;
$isPublicSent = false;
@@ -4615,7 +4615,7 @@ class Processes
}
// for public files
$PUBLIC_ROOT_PATH = PATH_DATA . 'sites' . PATH_SEP . SYS_SYS . PATH_SEP . 'public' . PATH_SEP . $data->process['PRO_UID'];
$PUBLIC_ROOT_PATH = PATH_DATA . 'sites' . PATH_SEP . config("system.workspace") . PATH_SEP . 'public' . PATH_SEP . $data->process['PRO_UID'];
//Get WebEntry file names
$arrayWebEntryFile = array();
@@ -4671,7 +4671,7 @@ class Processes
/*
// for public files
$PUBLIC_ROOT_PATH = PATH_DATA.'sites'.PATH_SEP.SYS_SYS.PATH_SEP.'public'.PATH_SEP.$data->process['PRO_UID'];
$PUBLIC_ROOT_PATH = PATH_DATA.'sites'.PATH_SEP.config("system.workspace").PATH_SEP.'public'.PATH_SEP.$data->process['PRO_UID'];
//if this process have any mailfile
if ( is_dir( $PUBLIC_ROOT_PATH ) ) {
//get mail files list from this directory
@@ -5067,7 +5067,7 @@ class Processes
$context['url'] = SYS_CURRENT_URI . '?' . SYS_CURRENT_PARMS;
}
$context['usrUid'] = isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '';
$sysSys = defined("SYS_SYS") ? SYS_SYS : "Undefined";
$sysSys = !empty(config("system.workspace")) ? config("system.workspace") : "Undefined";
$message = 'The imported template has a number of byes different than the original template, please verify if the file \'' . $newFileName . '\' is correct.';
$level = 400;
Bootstrap::registerMonolog($channel, $level, $message, $context, $sysSys, 'processmaker.log');
@@ -6079,7 +6079,7 @@ class Processes
}
//Set variables
$cs = new CodeScanner((!is_null($workspaceName))? $workspaceName : SYS_SYS);
$cs = new CodeScanner((!is_null($workspaceName))? $workspaceName : config("system.workspace"));
$delimiter = DBAdapter::getStringDelimiter();

View File

@@ -605,7 +605,7 @@ class ReportTables
try {
$rs = $stmt->executeQuery($sQuery);
} catch (Exception $e) {
Bootstrap::registerMonolog('sqlExecution', 400, 'Sql Execution', ['sql' => $sQuery,'error' => $e->getMessage()], SYS_SYS, 'processmaker.log');
Bootstrap::registerMonolog('sqlExecution', 400, 'Sql Execution', ['sql' => $sQuery,'error' => $e->getMessage()], config("system.workspace"), 'processmaker.log');
}
}
@@ -644,7 +644,7 @@ class ReportTables
try {
$rs = $stmt->executeQuery($sQuery);
} catch (Exception $e) {
Bootstrap::registerMonolog('sqlExecution', 400, 'Sql Execution', ['sql' => $sQuery,'error' => $e->getMessage()], SYS_SYS, 'processmaker.log');
Bootstrap::registerMonolog('sqlExecution', 400, 'Sql Execution', ['sql' => $sQuery,'error' => $e->getMessage()], config("system.workspace"), 'processmaker.log');
}
}
} else {

View File

@@ -152,12 +152,12 @@ class ServerConf
public function sucessfulLogin()
{
$this->logins++;
if (isset($this->workspaces[SYS_SYS]) && isset($this->workspaces[SYS_SYS]['WSP_LOGINS'])) {
$this->workspaces[SYS_SYS]['WSP_LOGINS']++;
if (isset($this->workspaces[config("system.workspace")]) && isset($this->workspaces[config("system.workspace")]['WSP_LOGINS'])) {
$this->workspaces[config("system.workspace")]['WSP_LOGINS']++;
}
if (isset($this->workspaces[SYS_SYS]) && !isset($this->workspaces[SYS_SYS]['WSP_LOGINS'])) {
$this->workspaces[SYS_SYS]['WSP_LOGINS'] = 1;
if (isset($this->workspaces[config("system.workspace")]) && !isset($this->workspaces[config("system.workspace")]['WSP_LOGINS'])) {
$this->workspaces[config("system.workspace")]['WSP_LOGINS'] = 1;
}
$this->saveSingleton();

View File

@@ -100,7 +100,7 @@ class Upgrade
try {
$num += 1;
printf("Upgrading workspaces ($num/$count): {$workspace->name}\n");
$workspace->upgrade(false, SYS_SYS, false, 'en', ['updateXml' => $first, 'updateMafe' => $first]);
$workspace->upgrade(false, config("system.workspace"), false, 'en', ['updateXml' => $first, 'updateMafe' => $first]);
$workspace->close();
$first = false;
} catch (Exception $e) {

View File

@@ -99,8 +99,11 @@ class WorkspaceTools
*
* @return void
*/
public function upgrade($buildCacheView = false, $workSpace = SYS_SYS, $onedb = false, $lang = 'en', array $arrayOptTranslation = null)
public function upgrade($buildCacheView = false, $workSpace = null, $onedb = false, $lang = 'en', array $arrayOptTranslation = null)
{
if ($workSpace === null) {
$workSpace = config("system.workspace");
}
if (is_null($arrayOptTranslation)) {
$arrayOptTranslation = ['updateXml' => true, 'updateMafe' => true];
}
@@ -220,8 +223,11 @@ class WorkspaceTools
* Updating cases directories structure
*
*/
public function updateStructureDirectories($workSpace = SYS_SYS)
public function updateStructureDirectories($workSpace = null)
{
if ($workSpace === null) {
$workSpace = config("system.workspace");
}
$start = microtime(true);
CLI::logging("> Updating cases directories structure...\n");
$this->upgradeCasesDirectoryStructure($workSpace);
@@ -470,8 +476,11 @@ class WorkspaceTools
/**
* Upgrade this workspace Content.
*/
public function upgradeContent($workSpace = SYS_SYS)
public function upgradeContent($workSpace = null)
{
if ($workSpace === null) {
$workSpace = config("system.workspace");
}
$this->initPropel(true);
//require_once 'classes/model/Translation.php';
$translation = new Translation();
@@ -1739,12 +1748,13 @@ class WorkspaceTools
$aParameters = array('dbHost' => $dbHost, 'dbUser' => $dbUser, 'dbPass' => $dbPass);
//Restore
if (!defined("SYS_SYS")) {
if (empty(config("system.workspace"))) {
define("SYS_SYS", $workspaceName);
config(["system.workspace" => $workspaceName]);
}
if (!defined("PATH_DATA_SITE")) {
define("PATH_DATA_SITE", PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP);
define("PATH_DATA_SITE", PATH_DATA . "sites" . PATH_SEP . config("system.workspace") . PATH_SEP);
}
$pmVersionWorkspaceToRestore = (preg_match("/^([\d\.]+).*$/", $metadata->PM_VERSION, $arrayMatch)) ? $arrayMatch[1] : "";
@@ -3937,8 +3947,11 @@ class WorkspaceTools
* Updating framework directory structure
*
*/
private function updateFrameworkPaths($workSpace = SYS_SYS)
private function updateFrameworkPaths($workSpace = null)
{
if ($workSpace === null) {
$workSpace = config("system.workspace");
}
$paths = [
PATH_DATA.'framework' => 0770,
PATH_DATA.'framework' . DIRECTORY_SEPARATOR . 'cache' => 0770,

View File

@@ -2033,15 +2033,23 @@ class WsBase
* This function is used when the case is derived from abe, Soap, PMFDerivateCase
*
* @param string $caseId, Uid related to the case
* @param array $appData, contain all the information about the case
* @param array $appData, contain all the information about the case related to the index [APP_DATA]
* @param string $tasUid, Uid related to the task
* @param string $stepType, before or after step
* @param string $stepUidObj, can be -1, -2
* @param string $triggerType, can be BEFORE, AFTER
* @param string $labelAssigment, label related to the triggerType
* @param string $labelAssignment, label related to the triggerType
*
* @return string $varTriggers updated
*/
public function executeTriggerFromDerivate(
$caseId, $appData, $tasUid, $stepType, $stepUidObj, $triggerType, $labelAssigment = ''
$caseId,
$appData,
$tasUid,
$stepType,
$stepUidObj,
$triggerType,
$labelAssignment = ''
) {
$varTriggers = "";
$oCase = new Cases();
@@ -2050,7 +2058,7 @@ class WsBase
$aTriggers = $oCase->loadTriggers($tasUid, $stepType, $stepUidObj, $triggerType);
if (count($aTriggers) > 0) {
$varTriggers = $varTriggers . "<br /><b>" . $labelAssigment . "</b><br />";
$varTriggers = $varTriggers . "<br /><b>" . $labelAssignment . "</b><br />";
$oPMScript = new PMScript();
@@ -2064,6 +2072,7 @@ class WsBase
$params->SID = $this->wsSessionId;
}
//We can set the index APP_DATA
$appFields["APP_DATA"] = array_merge($appData, G::getSystemConstants($params));
//PMScript
@@ -2089,6 +2098,9 @@ class WsBase
unset($appFields['APP_PROC_CODE']);
unset($appFields['APP_PIN']);
$oCase->updateCase($caseId, $appFields);
//We need to update the variable $appData for use the new variables in the next trigger
$appData = array_merge($appData, $appFields['APP_DATA']);
}
}
}

View File

@@ -239,7 +239,7 @@ function literalDate ($date, $lang = 'en')
*/
function executeQuery ($SqlStatement, $DBConnectionUID = 'workflow', $aParameter = array())
{
$sysSys = (defined("SYS_SYS"))? SYS_SYS : "Undefined";
$sysSys = (!empty(config("system.workspace")))? config("system.workspace") : "Undefined";
$aContext = \Bootstrap::getDefaultContextLog();
$con = Propel::getConnection( $DBConnectionUID );
$con->begin();
@@ -537,7 +537,7 @@ function WSOpen ($force = false)
);
if (! isset( $_SESSION["WS_END_POINT"] )) {
$defaultEndpoint = $_SERVER["REQUEST_SCHEME"] . "://" . $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . "/sys" . SYS_SYS . "/en/classic/services/wsdl2";
$defaultEndpoint = $_SERVER["REQUEST_SCHEME"] . "://" . $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . "/sys" . config("system.workspace") . "/en/classic/services/wsdl2";
}
$endpoint = isset( $_SESSION["WS_END_POINT"] ) ? $_SESSION["WS_END_POINT"] : $defaultEndpoint;
@@ -2098,7 +2098,7 @@ function PMFDerivateCase ($caseId, $delIndex, $bExecuteTriggersBeforeAssignment
* @param string(32) | $processId | Process ID | The unique ID of the process.
* @param string(32) | $userId | User ID | The unique ID of the user.
* @param array | $variables | Array of variables | An associative array of the variables which will be sent to the case.
* @param string(32) | $taskId | The unique ID of the task taha is in the starting group.
* @param string(32) | $taskId | The unique ID of the task that is in the starting group.
* @return int | $result | Result | Returns 1 if new case was created successfully; otherwise, returns 0 if an error occurred.
*
*/
@@ -3455,7 +3455,7 @@ function PMFCaseLink($caseUid, $workspace = null, $language = null, $skin = null
if ($arrayApplicationData === false) {
return false;
}
$workspace = (!empty($workspace)) ? $workspace : SYS_SYS;
$workspace = (!empty($workspace)) ? $workspace : config("system.workspace");
$language = (!empty($language)) ? $language : SYS_LANG;
$skin = (!empty($skin)) ? $skin : SYS_SKIN;

View File

@@ -45,16 +45,16 @@ use ProcessMaker\Plugins\PluginRegistry;
*/
function __autoload ($sClassName)
{
if (defined( 'SYS_SYS' )) {
$sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
if (!empty(config("system.workspace"))) {
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
if (file_exists( $sPath . $sClassName . '.php' )) {
require_once $sPath . $sClassName . '.php';
}
}
}
if (defined('SYS_SYS') && (!defined('PATH_DATA_SITE') || !defined('PATH_WORKSPACE'))) {
Bootstrap::setConstantsRelatedWs(SYS_SYS);
if (!empty(config("system.workspace")) && (!defined('PATH_DATA_SITE') || !defined('PATH_WORKSPACE'))) {
Bootstrap::setConstantsRelatedWs(config("system.workspace"));
}
//Add External Triggers

View File

@@ -39,7 +39,7 @@ class ProcessMakerWebDav extends HTTP_WebDAV_Server
public function ServeRequest($base = false)
{
//$this->base = '/';
$this->uriBase = '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/webdav/';
$this->uriBase = '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/webdav/';
// let the base class do all the work
parent::ServeRequest();
@@ -72,7 +72,7 @@ class ProcessMakerWebDav extends HTTP_WebDAV_Server
// prepare property array
$files["files"] = array();
$pathClasses = PATH_DB . PATH_SEP . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
$pathClasses = PATH_DB . PATH_SEP . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
if (count($paths) == 0 && is_dir($pathClasses)) {
$props = array();
$props[] = $this->mkprop("displayname", 'Classes');
@@ -110,7 +110,7 @@ class ProcessMakerWebDav extends HTTP_WebDAV_Server
} //path classes
$pathProcesses = PATH_DB . SYS_SYS . PATH_SEP;
$pathProcesses = PATH_DB . config("system.workspace") . PATH_SEP;
if (count($paths) == 0 && is_dir($pathProcesses)) {
$props = array();
$props[] = $this->mkprop("displayname", 'Processes');
@@ -404,7 +404,7 @@ class ProcessMakerWebDav extends HTTP_WebDAV_Server
$options = $filter->xssFilterHard($options);
$paths = $filter->xssFilterHard($this->paths);
$pathClasses = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
$pathClasses = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
if (count($paths) > 0 && $paths[0] == 'classes' && is_dir($pathClasses)) {
$fsFile = $pathClasses . $paths[1];
$fsFile = $filter->xssFilterHard($fsFile);
@@ -419,7 +419,7 @@ class ProcessMakerWebDav extends HTTP_WebDAV_Server
}
}
$pathProcesses = PATH_DB . SYS_SYS . PATH_SEP;
$pathProcesses = PATH_DB . config("system.workspace") . PATH_SEP;
if (count($paths) > 0 && $paths[0] == 'processes' && is_dir($pathProcesses)) {
if (count($paths) == 4 && $paths[2] == 'xmlforms') {
$pathXmlform = $pathProcesses . 'xmlForms' . PATH_SEP . $paths[1] . PATH_SEP;
@@ -636,7 +636,7 @@ class ProcessMakerWebDav extends HTTP_WebDAV_Server
}
}
$pathProcesses = PATH_DB . SYS_SYS . PATH_SEP;
$pathProcesses = PATH_DB . config("system.workspace") . PATH_SEP;
if (count($paths) > 0 && $paths[0] == 'processes' && is_dir($pathProcesses)) {
if ($paths[2] == 'xmlforms') {
$pathTemplates = $pathProcesses . 'xmlForms' . PATH_SEP . $paths[1] . PATH_SEP;

View File

@@ -332,7 +332,7 @@ class AdditionalTables extends BaseAdditionalTables
{
try {
$aData = $this->load($sUID, true);
$sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
$sClassName = ($aData['ADD_TAB_CLASS_NAME'] != ''
? $aData['ADD_TAB_CLASS_NAME']
: $this->getPHPName($aData['ADD_TAB_NAME']));
@@ -383,7 +383,7 @@ class AdditionalTables extends BaseAdditionalTables
$_SESSION["PROCESS"] = $aData['PRO_UID'];
}
$aData['DBS_UID'] = $aData['DBS_UID'] ? $aData['DBS_UID'] : 'workflow';
$sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
$sClassName = ($aData['ADD_TAB_CLASS_NAME'] != ''
? $aData['ADD_TAB_CLASS_NAME']
: $this->getPHPName($aData['ADD_TAB_NAME']));
@@ -531,7 +531,7 @@ class AdditionalTables extends BaseAdditionalTables
{
try {
$aData = $this->load($sUID, true);
$sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
$sClassName = ($aData['ADD_TAB_CLASS_NAME'] != ''
? $aData['ADD_TAB_CLASS_NAME']
: $this->getPHPName($aData['ADD_TAB_NAME']));
@@ -550,7 +550,7 @@ class AdditionalTables extends BaseAdditionalTables
{
try {
$aData = $this->load($sUID, true);
$sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
$sClassName = ($aData['ADD_TAB_CLASS_NAME'] != ''
? $aData['ADD_TAB_CLASS_NAME']
: $this->getPHPName($aData['ADD_TAB_NAME']));
@@ -604,7 +604,7 @@ class AdditionalTables extends BaseAdditionalTables
{
try {
$aData = $this->load($sUID, true);
$sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
$sClassName = ($aData['ADD_TAB_CLASS_NAME'] != ''
? $aData['ADD_TAB_CLASS_NAME']
: $this->getPHPName($aData['ADD_TAB_NAME']));
@@ -632,7 +632,7 @@ class AdditionalTables extends BaseAdditionalTables
try {
//$sPMUID = $aFields['PM_UNIQUE_ID'];
$aData = $this->load($sUID, true);
$sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
$sClassName = ($aData['ADD_TAB_CLASS_NAME'] != ''
? $aData['ADD_TAB_CLASS_NAME']
: $this->getPHPName($aData['ADD_TAB_NAME']));
@@ -679,7 +679,7 @@ class AdditionalTables extends BaseAdditionalTables
{
try {
$aData = $this->load($sUID, true);
$sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
$sClassName = ($aData['ADD_TAB_CLASS_NAME'] != ''
? $aData['ADD_TAB_CLASS_NAME']
: $this->getPHPName($aData['ADD_TAB_NAME']));
@@ -1159,7 +1159,7 @@ class AdditionalTables extends BaseAdditionalTables
$sClassName = $this->getPHPName($sTableName);
}
$sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
if (!file_exists($sPath)) {
G::mk_dir($sPath);
}

View File

@@ -367,7 +367,7 @@ class AddonsStore extends BaseAddonsStore
$sStatus = $oDetails->isEnabled() ? G::LoadTranslation('ID_ENABLED') : G::LoadTranslation('ID_DISABLED');
if ($oDetails->getWorkspaces()) {
if (!in_array(SYS_SYS, $oDetails->getWorkspaces())) {
if (!in_array(config("system.workspace"), $oDetails->getWorkspaces())) {
continue;
}
}

View File

@@ -332,7 +332,7 @@ class CaseScheduler extends BaseCaseScheduler
}
}
$url = SERVER_NAME . $port . "/sys" . SYS_SYS . "/" . SYS_LANG . "/classic/services/wsdl2";
$url = SERVER_NAME . $port . "/sys" . config("system.workspace") . "/" . SYS_LANG . "/classic/services/wsdl2";
$testConnection = true;
try {

View File

@@ -312,8 +312,11 @@ class Content extends BaseContent
*
* @param array $langs
*/
public function regenerateContent ($langs, $workSpace = SYS_SYS)
public function regenerateContent ($langs, $workSpace = null)
{
if ($workSpace === null) {
$workSpace = config("system.workspace");
}
//Search the language
$key = array_search( 'en', $langs );
if ($key === false) {

View File

@@ -739,7 +739,7 @@ class Process extends BaseProcess
}
$memcache = & PMmemcached::getSingleton( SYS_SYS );
$memcache = & PMmemcached::getSingleton( config("system.workspace") );
if (isset($memcache) && $memcache->enabled == 1 ) {
return $aProcesses;
}
@@ -766,7 +766,7 @@ class Process extends BaseProcess
GROUP BY PRO_UID, APP_STATUS*/
require_once 'classes/model/Application.php';
$memcache = & PMmemcached::getSingleton( SYS_SYS );
$memcache = & PMmemcached::getSingleton( config("system.workspace") );
$memkey = 'getCasesCountInAllProcesses';
if (($aProcesses = $memcache->get( $memkey )) === false) {
$oCriteria = new Criteria( 'workflow' );
@@ -877,7 +877,7 @@ class Process extends BaseProcess
$limit = 25;
$start = 0;
$memcache = PMmemcached::getSingleton( SYS_SYS );
$memcache = PMmemcached::getSingleton( config("system.workspace") );
for ($start = 0; $start <= 50 - 1; $start ++) {
$memkey = "processList-allProcesses-" . ($start * $limit) . "-" . $limit;

View File

@@ -258,10 +258,10 @@ class UsersProperties extends BaseUsersProperties
$url = $this->_getDefaultLocation();
return $url;
} else {
$url = '/sys' . SYS_SYS . '/' . $this->lang . '/' . $_COOKIE['workspaceSkin'] . '/main';
$url = '/sys' . config("system.workspace") . '/' . $this->lang . '/' . $_COOKIE['workspaceSkin'] . '/main';
}
} else {
$url = '/sys' . SYS_SYS . '/' . $this->lang . '/' . SYS_SKIN . '/main';
$url = '/sys' . config("system.workspace") . '/' . $this->lang . '/' . SYS_SKIN . '/main';
}
global $RBAC;
$oConf = new Configurations();
@@ -330,9 +330,9 @@ class UsersProperties extends BaseUsersProperties
$pathMethod = $detail->getPathMethod();
if (isset($pathMethod) && $detail->equalRoleCodeTo($userRole)) {
if (isset($_COOKIE['workspaceSkin'])) {
$url = '/sys' . SYS_SYS . '/' . $this->lang . '/' . $_COOKIE['workspaceSkin'] . '/' . $pathMethod;
$url = '/sys' . config("system.workspace") . '/' . $this->lang . '/' . $_COOKIE['workspaceSkin'] . '/' . $pathMethod;
} else {
$url = '/sys' . SYS_SYS . '/' . $this->lang . '/' . SYS_SKIN . '/' . $pathMethod;
$url = '/sys' . config("system.workspace") . '/' . $this->lang . '/' . SYS_SKIN . '/' . $pathMethod;
}
}
}
@@ -376,7 +376,7 @@ class UsersProperties extends BaseUsersProperties
case 'SINGLE':
$_SESSION['user_experience'] = $uxType;
$_SESSION['user_last_skin'] = SYS_SKIN;
$url = '/sys' . SYS_SYS . '/' . $this->lang . '/uxs/' . 'home';
$url = '/sys' . config("system.workspace") . '/' . $this->lang . '/uxs/' . 'home';
break;
}
@@ -393,11 +393,10 @@ class UsersProperties extends BaseUsersProperties
$oConf = new Configurations();
$oConf->loadConfig( $x, 'USER_PREFERENCES', '', '', $_SESSION['USER_LOGGED'], '' );
//$baseUrl = '/sys' . SYS_SYS . '/' . $this->lang . '/' . SYS_SKIN . '/';
if (isset($_COOKIE['workspaceSkin'])) {
$baseUrl = '/sys' . SYS_SYS . '/' . $this->lang . '/' . $_COOKIE['workspaceSkin'] . '/';
$baseUrl = '/sys' . config("system.workspace") . '/' . $this->lang . '/' . $_COOKIE['workspaceSkin'] . '/';
} else {
$baseUrl = '/sys' . SYS_SYS . '/' . $this->lang . '/' . SYS_SKIN . '/';
$baseUrl = '/sys' . config("system.workspace") . '/' . $this->lang . '/' . SYS_SKIN . '/';
}
$url = '';

View File

@@ -305,10 +305,10 @@ function getFolderChildren($alfrescoServerUrl, $folderId, $user, $pwd)
/**
* @method
*
* Uplaod file/document in Alfresco Repository
* Upload file/document in Alfresco Repository
*
* @name uploadDoc
* @label Uplaod file/document in Alfresco Repository
* @label Upload file/document in Alfresco Repository
*
* @param string | $alfrescoServerUrl | Server name and port where Alfresco exists | http://localhost:8080/alfresco
* @param string | $fileSource | File Source

View File

@@ -23,12 +23,12 @@
*
*/
if (defined('PATH_DB') && defined('SYS_SYS')) {
if (defined('PATH_DB') && !empty(config("system.workspace"))) {
if (!file_exists(PATH_DB . SYS_SYS . '/db.php'))
throw new Exception("Could not find db.php in current workspace " . SYS_SYS);
if (!file_exists(PATH_DB . config("system.workspace") . '/db.php'))
throw new Exception("Could not find db.php in current workspace " . config("system.workspace"));
require_once(PATH_DB . SYS_SYS . '/db.php');
require_once(PATH_DB . config("system.workspace") . '/db.php');
//to do: enable for other databases
$dbType = DB_ADAPTER;
$dsn = DB_ADAPTER . '://' . DB_USER . ':' . urlencode(DB_PASS) . '@' . DB_HOST . '/' . DB_NAME;

View File

@@ -1750,8 +1750,62 @@ msgstr "Changes saved"
# TRANSLATION
# LABEL/ID_EMAILS
#: LABEL/ID_EMAILS
msgid "EMAILS"
msgstr "EMAILS"
msgid "Emails"
msgstr "Emails"
# TRANSLATION
# LABEL/ID_NO_PREVIOUS_USR_UID
#: LABEL/ID_NO_PREVIOUS_USR_UID
msgid "The previous task doesn't have any users."
msgstr "The previous task doesn't have any users."
# TRANSLATION
# LABEL/ID_SET_NO_MANAGER
#: LABEL/ID_SET_NO_MANAGER
msgid "Unassign Manager"
msgstr "Unassign Manager"
# TRANSLATION
# LABEL/ID_ERROR_EMAIL
#: LABEL/ID_ERROR_EMAIL
msgid "Error"
msgstr "Error"
# TRANSLATION
# LABEL/ID_CASE_SCHEDULER_CLASSIC
#: LABEL/ID_CASE_SCHEDULER_CLASSIC
msgid "Case Scheduler (classic processes)"
msgstr "Case Scheduler (classic processes)"
# TRANSLATION
# LABEL/ID_PROCESS_IS_REQUIRED
#: LABEL/ID_PROCESS_IS_REQUIRED
msgid "Process field is required"
msgstr "Process field is required"
# TRANSLATION
# LABEL/ID_DELEGATE_DATE_FROM
#: LABEL/ID_DELEGATE_DATE_FROM
msgid "Date from"
msgstr "Date from"
# TRANSLATION
# LABEL/ID_REASSIGN_CONFIRM
#: LABEL/ID_REASSIGN_CONFIRM
msgid "Do you want to reassign the case?"
msgstr "Do you want to reassign the case?"
# TRANSLATION
# LABEL/ID_MESSAGE_SUBJECT_NOTE_NOTIFICATION
#: LABEL/ID_MESSAGE_SUBJECT_NOTE_NOTIFICATION
msgid "A note has been added to the case"
msgstr "A note has been added to the case"
# TRANSLATION
# LABEL/ID_EVENTS_CLASSIC
#: LABEL/ID_EVENTS_CLASSIC
msgid "Events (classic processes)"
msgstr "Events (classic processes)"
# TRANSLATION
# LABEL/ID_REPORT2
@@ -5360,12 +5414,6 @@ msgstr "Can not save, because, there is an Output Document with the same name in
msgid "User or password is empty."
msgstr "User or password is empty."
# TRANSLATION
# LABEL/ID_DELEGATE_DATE_FROM
#: LABEL/ID_DELEGATE_DATE_FROM
msgid "Delegated date from"
msgstr "Delegated date from"
# TRANSLATION
# JAVASCRIPT/ID_DUPLICATE_CATEGORY_NAME
#: JAVASCRIPT/ID_DUPLICATE_CATEGORY_NAME
@@ -6872,12 +6920,6 @@ msgstr "Last Name"
msgid "Case #{APP_NUMBER} was reassigned to user {USER}."
msgstr "Case #{APP_NUMBER} was reassigned to user {USER}."
# TRANSLATION
# LABEL/ID_REASSIGN_CONFIRM
#: LABEL/ID_REASSIGN_CONFIRM
msgid "Are you sure to reassign the current case?"
msgstr "Are you sure to reassign the current case?"
# TRANSLATION
# LABEL/ID_CASE_PAUSED_SUCCESSFULLY
#: LABEL/ID_CASE_PAUSED_SUCCESSFULLY
@@ -10508,12 +10550,6 @@ msgstr "From each table select at least one Schema/Data to export."
msgid "Do you want to delete the selected skin?"
msgstr "Do you want to delete the selected skin?"
# TRANSLATION
# LABEL/ID_MESSAGE_SUBJECT_NOTE_NOTIFICATION
#: LABEL/ID_MESSAGE_SUBJECT_NOTE_NOTIFICATION
msgid "A note has been added to the case."
msgstr "A note has been added to the case."
# TRANSLATION
# LABEL/ID_MSG_CANNOT_EXPORT_DEFAULT_SKIN
#: LABEL/ID_MSG_CANNOT_EXPORT_DEFAULT_SKIN
@@ -18685,12 +18721,6 @@ msgstr "Compare"
msgid "You can click on one of the dashboards to view the data or click on the favorite icon to make it your main dashboard."
msgstr "You can click on one of the dashboards to view the data or click on the favorite icon to make it your main dashboard."
# TRANSLATION
# LABEL/ID_SET_NO_MANAGER
#: LABEL/ID_SET_NO_MANAGER
msgid "No set Manager"
msgstr "No set Manager"
# TRANSLATION
# LABEL/ID_NO_SET_MANAGER_SUCCES
#: LABEL/ID_NO_SET_MANAGER_SUCCES
@@ -18895,12 +18925,6 @@ msgstr "(Goal value)"
msgid "Please enter your credentials below"
msgstr "Please enter your credentials below"
# TRANSLATION
# LABEL/ID_ERROR_EMAIL
#: LABEL/ID_ERROR_EMAIL
msgid "Error email"
msgstr "Error email"
# TRANSLATION
# LABEL/ID_AVAILABLE_DATABASE
#: LABEL/ID_AVAILABLE_DATABASE
@@ -27473,12 +27497,6 @@ msgstr "Error: The application {0} is not canceled."
msgid "Error: Thread status does not exist for the application {0}."
msgstr "Error: Thread status does not exist for the application {0}."
# TRANSLATION
# LABEL/ID_NO_PREVIOUS_USR_UID
#: LABEL/ID_NO_PREVIOUS_USR_UID
msgid "The previuos task doesn't have any users."
msgstr "The previuos task doesn't have any users."
# TRANSLATION
# LABEL/ID_WARNING_GATEWAY_CONVERGENT_WITH_CONDITION
#: LABEL/ID_WARNING_GATEWAY_CONVERGENT_WITH_CONDITION

View File

@@ -314,7 +314,7 @@ class Admin extends Controller
);
}
$properties[] = array ( G::LoadTranslation('ID_WORKSPACE') ,defined( "SYS_SYS" ) ? SYS_SYS : "Not defined",$pmSection
$properties[] = array(G::LoadTranslation('ID_WORKSPACE'), !empty(config("system.workspace")) ? config("system.workspace") : "Not defined", $pmSection
);
$properties[] = array ( G::LoadTranslation('ID_SERVER_PROTOCOL') ,getenv( 'SERVER_PROTOCOL' ),$sysSection

View File

@@ -117,7 +117,7 @@ class adminProxy extends HttpProxyController
$this->success = true;
$this->restart = $restart;
$this->url = "/sys" . SYS_SYS . "/" . (($sysConf["default_lang"] != "")? $sysConf["default_lang"] : ((defined("SYS_LANG") && SYS_LANG != "")? SYS_LANG : "en")) . "/" . $sysConf["default_skin"] . $urlPart;
$this->url = "/sys" . config("system.workspace") . "/" . (($sysConf["default_lang"] != "")? $sysConf["default_lang"] : ((defined("SYS_LANG") && SYS_LANG != "")? SYS_LANG : "en")) . "/" . $sysConf["default_skin"] . $urlPart;
$this->message = 'Saved Successfully';
$msg = "";
if ($httpData->proxy_host != '' || $httpData->proxy_port != '' || $httpData->proxy_user != '') {
@@ -1191,7 +1191,7 @@ class adminProxy extends HttpProxyController
$snameLogo = self::changeNamelogo($snameLogo);
$oConf = new Configurations;
$aConf = Array(
'WORKSPACE_LOGO_NAME' => SYS_SYS,
'WORKSPACE_LOGO_NAME' => config("system.workspace"),
'DEFAULT_LOGO_NAME' => $snameLogo
);
@@ -1356,7 +1356,7 @@ class adminProxy extends HttpProxyController
'%s://%s/sys%s/%s/%s/oauth2/grant',
$http,
$host,
SYS_SYS,
config("system.workspace"),
$lang,
SYS_SKIN
);
@@ -1416,7 +1416,7 @@ class adminProxy extends HttpProxyController
//On premise or cloud
$licInfo = $oServerConf->getProperty( 'LICENSE_INFO' );
$params['lt'] = isset($licInfo[SYS_SYS]) ? isset($licInfo[SYS_SYS]['TYPE'])? $licInfo[SYS_SYS]['TYPE'] : '' : '';
$params['lt'] = isset($licInfo[config("system.workspace")]) ? isset($licInfo[config("system.workspace")]['TYPE'])? $licInfo[config("system.workspace")]['TYPE'] : '' : '';
//ProcessMaker Version
$params['v'] = System::getVersion();
@@ -1511,7 +1511,7 @@ class adminProxy extends HttpProxyController
$params['t'] = (defined('TIME_ZONE') && TIME_ZONE != "Unknown") ? TIME_ZONE : date_default_timezone_get();
$params['w'] = count(System::listWorkspaces());
$support = PATH_DATA_SITE . G::sanitizeString($licenseManager->info['FIRST_NAME'] . '-' . $licenseManager->info['LAST_NAME'] . '-' . SYS_SYS . '-' . date('YmdHis'), false, false) . '.spm';
$support = PATH_DATA_SITE . G::sanitizeString($licenseManager->info['FIRST_NAME'] . '-' . $licenseManager->info['LAST_NAME'] . '-' . config("system.workspace") . '-' . date('YmdHis'), false, false) . '.spm';
file_put_contents($support, serialize($params));
G::streamFile($support, true);
G::rm_dir($support);

View File

@@ -97,7 +97,7 @@ class caseSchedulerProxy extends HttpProxyController
} else {
$http = 'http://';
}
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
@$client = new SoapClient( $endpoint );
$user = $sWS_USER;

View File

@@ -62,7 +62,7 @@ class Designer extends Controller
$this->setVar('credentials', base64_encode(json_encode($clientToken)));
$this->setVar('isDebugMode', $debug);
$this->setVar("distribution", $distribution);
$this->setVar("SYS_SYS", SYS_SYS);
$this->setVar("SYS_SYS", config("system.workspace"));
$this->setVar("SYS_LANG", SYS_LANG);
$this->setVar("SYS_SKIN", SYS_SKIN);
$this->setVar('HTTP_SERVER_HOSTNAME', System::getHttpServerHostnameRequestsFrontEnd());
@@ -219,7 +219,7 @@ class Designer extends Controller
}
Tracker::authentication($_SESSION['CASE'], $_SESSION['PIN']);
} catch (\Exception $e) {
Bootstrap::registerMonolog('CaseTracker', 400, $e->getMessage(), [], SYS_SYS, 'processmaker.log');
Bootstrap::registerMonolog('CaseTracker', 400, $e->getMessage(), [], config("system.workspace"), 'processmaker.log');
\G::header('Location: /errors/error403.php');
die();
}

View File

@@ -131,7 +131,7 @@ class Home extends Controller
if (!isset($_COOKIE['workspaceSkin'])) {
if (substr( $sysConf['default_skin'], 0, 2 ) == 'ux') {
$_SESSION['_defaultUserLocation'] = $switchLink;
$switchLink = '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . $sysConf['default_skin'] . '/main';
$switchLink = '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . $sysConf['default_skin'] . '/main';
}
}
@@ -531,7 +531,7 @@ class Home extends Controller
$conf = new Configurations();
$generalConfCasesList = $conf->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
$cases['data'][$i]['DEL_DELEGATE_DATE'] = '';
if (defined('SYS_SYS')) {
if (!empty(config("system.workspace"))) {
if (isset( $generalConfCasesList['casesListDateFormat'] ) && ! empty( $generalConfCasesList['casesListDateFormat'] )) {
$cases['data'][$i]['DEL_DELEGATE_DATE'] = $conf->getSystemDate($row['DEL_DELEGATE_DATE'], 'casesListDateFormat');
}

View File

@@ -919,6 +919,7 @@ class InstallerModule extends Controller
define( 'SYSTEM_HASH', $sh );
define( 'PATH_DB', $pathShared . 'sites' . PATH_SEP );
define( 'SYS_SYS', $workspace );
config(["system.workspace" => $workspace]);
require_once ("propel/Propel.php");

View File

@@ -17,7 +17,7 @@ class Main extends Controller
public function __construct ()
{
$this->memcache = & PMmemcached::getSingleton( defined( 'SYS_SYS' ) ? SYS_SYS : '' );
$this->memcache = & PMmemcached::getSingleton( !empty(config("system.workspace")) ? config("system.workspace") : '' );
define( 'ERROR_EXCEPTION', 1 );
define( 'INFO_EXCEPTION', 3 );
@@ -40,7 +40,7 @@ class Main extends Controller
$this->setVar( 'pipe', isset( $_SESSION['USR_USERNAME'] ) ? ' | ' : '' );
$this->setVar( 'rolename', $this->getUserRole() );
$this->setVar( 'logout', G::LoadTranslation( 'ID_LOGOUT' ) );
$this->setVar( 'workspace', defined( 'SYS_SYS' ) ? ucfirst( SYS_SYS ) : '' );
$this->setVar( 'workspace', !empty(config("system.workspace")) ? ucfirst( config("system.workspace") ) : '' );
$this->setVar( 'user_avatar', 'users/users_ViewPhotoGrid?pUID=' . $_SESSION['USER_LOGGED'] . '&h=' . rand() );
// license notification
@@ -464,7 +464,7 @@ class Main extends Controller
{
$sCompanyLogo = '/images/processmaker2.logo2.png';
if (defined( "SYS_SYS" )) {
if (!empty(config("system.workspace"))) {
if (($aFotoSelect = $this->memcache->get( 'aFotoSelect' )) === false) {
$oLogoR = new ReplacementLogo();
$aFotoSelect = $oLogoR->getNameLogo( (isset( $_SESSION['USER_LOGGED'] )) ? $_SESSION['USER_LOGGED'] : '' );
@@ -480,9 +480,9 @@ class Main extends Controller
$logoPlugin = $oPluginRegistry->getCompanyLogo( $sCompanyLogo );
if ($logoPlugin != '/images/processmaker2.logo2.png') {
$sCompanyLogo = $logoPlugin;
} elseif (isset( $sFotoSelect ) && $sFotoSelect != '' && ! (strcmp( $sWspaceSelect, SYS_SYS ))) {
} elseif (isset( $sFotoSelect ) && $sFotoSelect != '' && ! (strcmp( $sWspaceSelect, config("system.workspace") ))) {
$sCompanyLogo = $oPluginRegistry->getCompanyLogo( $sFotoSelect );
$sCompanyLogo = "/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/adminProxy/showLogoFile?id=" . base64_encode( $sCompanyLogo );
$sCompanyLogo = "/sys" . config("system.workspace") . "/" . SYS_LANG . "/" . SYS_SKIN . "/adminProxy/showLogoFile?id=" . base64_encode( $sCompanyLogo );
}
}
return $sCompanyLogo;
@@ -778,7 +778,7 @@ class Main extends Controller
);
}
$properties[] = array ( G::LoadTranslation('ID_WORKSPACE') ,defined( "SYS_SYS" ) ? SYS_SYS : "Not defined",$pmSection
$properties[] = array ( G::LoadTranslation('ID_WORKSPACE') ,!empty(config("system.workspace")) ? config("system.workspace") : "Not defined",$pmSection
);
$properties[] = array ( G::LoadTranslation('ID_SERVER_PROTOCOL') ,getenv( 'SERVER_PROTOCOL' ),$sysSection

View File

@@ -147,7 +147,7 @@ class pmTables extends Controller
public function streamExported ($httpData)
{
$PUBLIC_ROOT_PATH = PATH_DATA . 'sites' . PATH_SEP . SYS_SYS . PATH_SEP . 'public' . PATH_SEP;
$PUBLIC_ROOT_PATH = PATH_DATA . 'sites' . PATH_SEP . config("system.workspace") . PATH_SEP . 'public' . PATH_SEP;
$sFileName = $httpData->f;
$realPath = $PUBLIC_ROOT_PATH . $sFileName;

View File

@@ -117,7 +117,7 @@ class pmTablesProxy extends HttpProxyController
$dbConn = new DbConnections();
$dbConnections = $dbConn->getConnectionsProUid( $proUid, array('mysql') );
$workSpace = new WorkspaceTools(SYS_SYS);
$workSpace = new WorkspaceTools(config("system.workspace"));
$workspaceDB = $workSpace->getDBInfo();
if ($workspaceDB['DB_NAME'] == $workspaceDB['DB_RBAC_NAME']) {
@@ -399,7 +399,7 @@ class pmTablesProxy extends HttpProxyController
$primaryKeys = $oAdditionalTables->getPrimaryKeys( 'keys' );
$this->className = $table['ADD_TAB_CLASS_NAME'];
$this->classPeerName = $this->className . 'Peer';
$sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
if (! file_exists( $sPath . $this->className . '.php' )) {
throw new Exception( 'Update:: ' . G::loadTranslation( 'ID_PMTABLE_CLASS_DOESNT_EXIST', $this->className ) );
@@ -440,7 +440,7 @@ class pmTablesProxy extends HttpProxyController
$table = $oAdditionalTables->load( $httpData->id, true );
$this->className = $table['ADD_TAB_CLASS_NAME'];
$this->classPeerName = $this->className . 'Peer';
$sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
if (! file_exists( $sPath . $this->className . '.php' )) {
throw new Exception( 'Destroy:: ' . G::loadTranslation( 'ID_PMTABLE_CLASS_DOESNT_EXIST', $this->className ) );
@@ -664,7 +664,7 @@ class pmTablesProxy extends HttpProxyController
$rows = $resultData['rows'];
$count = $resultData['count'];
$PUBLIC_ROOT_PATH = PATH_DATA . 'sites' . PATH_SEP . SYS_SYS . PATH_SEP . 'public' . PATH_SEP;
$PUBLIC_ROOT_PATH = PATH_DATA . 'sites' . PATH_SEP . config("system.workspace") . PATH_SEP . 'public' . PATH_SEP;
$filenameOnly = strtolower($aAdditionalTables['ADD_TAB_NAME'] . "_" . date("Y-m-d") . '_' . date("Hi") . ".csv");
$filename = $PUBLIC_ROOT_PATH . $filenameOnly;
$fp = fopen($filename, "wb");
@@ -733,7 +733,7 @@ class pmTablesProxy extends HttpProxyController
$_SESSION['FILES_FORM'] = $_FILES['form'];
$PUBLIC_ROOT_PATH = PATH_DATA . 'sites' . PATH_SEP . SYS_SYS . PATH_SEP . 'public' . PATH_SEP;
$PUBLIC_ROOT_PATH = PATH_DATA . 'sites' . PATH_SEP . config("system.workspace") . PATH_SEP . 'public' . PATH_SEP;
$filename = $_FILES['form']['name']['FILENAME'];
$tempName = $_FILES['form']['tmp_name']['FILENAME'];
@@ -923,7 +923,7 @@ class pmTablesProxy extends HttpProxyController
$result = new stdClass();
$net = new Net( G::getIpAddress() );
$META = " \n-----== ProcessMaker Open Source Private Tables ==-----\n" . " @Ver: 1.0 Oct-2009\n" . " @Processmaker version: " . System::getVersion() . "\n" . " -------------------------------------------------------\n" . " @Export Date: " . date( "l jS \of F Y h:i:s A" ) . "\n" . " @Server address: " . getenv( 'SERVER_NAME' ) . " (" . getenv( 'SERVER_ADDR' ) . ")\n" . " @Client address: " . $net->hostname . "\n" . " @Workspace: " . SYS_SYS . "\n" . " @Export trace back:\n\n";
$META = " \n-----== ProcessMaker Open Source Private Tables ==-----\n" . " @Ver: 1.0 Oct-2009\n" . " @Processmaker version: " . System::getVersion() . "\n" . " -------------------------------------------------------\n" . " @Export Date: " . date( "l jS \of F Y h:i:s A" ) . "\n" . " @Server address: " . getenv( 'SERVER_NAME' ) . " (" . getenv( 'SERVER_ADDR' ) . ")\n" . " @Client address: " . $net->hostname . "\n" . " @Workspace: " . config("system.workspace") . "\n" . " @Export trace back:\n\n";
$EXPORT_TRACEBACK = Array ();
$c = 0;
@@ -947,9 +947,9 @@ class pmTablesProxy extends HttpProxyController
$META .= $sTrace;
///////////////EXPORT PROCESS
$PUBLIC_ROOT_PATH = PATH_DATA . 'sites' . PATH_SEP . SYS_SYS . PATH_SEP . 'public' . PATH_SEP;
$PUBLIC_ROOT_PATH = PATH_DATA . 'sites' . PATH_SEP . config("system.workspace") . PATH_SEP . 'public' . PATH_SEP;
$filenameOnly = strtolower( 'SYS-' . SYS_SYS . "_" . date( "Y-m-d" ) . '_' . date( "Hi" ) . ".pmt" );
$filenameOnly = strtolower( 'SYS-' . config("system.workspace") . "_" . date( "Y-m-d" ) . '_' . date( "Hi" ) . ".pmt" );
$filename = $PUBLIC_ROOT_PATH . $filenameOnly;
$fp = fopen( $filename, "wb" );

View File

@@ -33,7 +33,7 @@ class StrategicDashboard extends Controller
$user = new Users();
$user = $user->load($RBAC->aUserInfo['USER_INFO']['USR_UID']);
$this->usrUnitCost = $this->currencySymbolToShow($user);
$this->urlProxy = System::getHttpServerHostnameRequestsFrontEnd() . '/api/1.0/' . SYS_SYS . '/';
$this->urlProxy = System::getHttpServerHostnameRequestsFrontEnd() . '/api/1.0/' . config("system.workspace") . '/';
//change
$clientId = 'x-pm-local-client';
$client = $this->getClientCredentials($clientId);
@@ -194,7 +194,7 @@ class StrategicDashboard extends Controller
$this->setView( 'strategicDashboard/viewDashboard' );
$this->setVar('urlProxy', $this->urlProxy);
$this->setVar('SYS_SYS', SYS_SYS);
$this->setVar('SYS_SYS', config("system.workspace"));
$this->setVar('usrId', $this->usrId);
$this->setVar('credentials', $this->clientToken);
$this->setVar('unitCost', $this->usrUnitCost);

View File

@@ -21,8 +21,8 @@ class webEntryProxy extends HttpProxyController
$editEvent['EVN_CONDITIONS'] = null;
$event->update( $editEvent );
unlink( PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "public" . PATH_SEP . $pro_uid . PATH_SEP . $filename );
unlink( PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "public" . PATH_SEP . $pro_uid . PATH_SEP . str_replace( ".php", "Post", $filename ) . ".php" );
unlink( PATH_DATA . "sites" . PATH_SEP . config("system.workspace") . PATH_SEP . "public" . PATH_SEP . $pro_uid . PATH_SEP . $filename );
unlink( PATH_DATA . "sites" . PATH_SEP . config("system.workspace") . PATH_SEP . "public" . PATH_SEP . $pro_uid . PATH_SEP . str_replace( ".php", "Post", $filename ) . ".php" );
$this->success = true;
$this->msg = G::LoadTranslation( 'ID_WEB_ENTRY_SUCCESS_DELETE' );
@@ -46,7 +46,7 @@ class webEntryProxy extends HttpProxyController
$http = 'http://';
}
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
@$client = new SoapClient( $endpoint );
$user = $sWS_USER;
@@ -122,8 +122,8 @@ class webEntryProxy extends HttpProxyController
$pro_uid = $params->pro_uid;
$filename = $xDYNA;
$filename = $filename . '.php';
unlink( PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "public" . PATH_SEP . $pro_uid . PATH_SEP . $filename );
unlink( PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "public" . PATH_SEP . $pro_uid . PATH_SEP . str_replace( ".php", "Post", $filename ) . ".php" );
unlink( PATH_DATA . "sites" . PATH_SEP . config("system.workspace") . PATH_SEP . "public" . PATH_SEP . $pro_uid . PATH_SEP . $filename );
unlink( PATH_DATA . "sites" . PATH_SEP . config("system.workspace") . PATH_SEP . "public" . PATH_SEP . $pro_uid . PATH_SEP . str_replace( ".php", "Post", $filename ) . ".php" );
}
$pathProcess = PATH_DATA_SITE . 'public' . PATH_SEP . $sPRO_UID . PATH_SEP;
@@ -167,8 +167,8 @@ class webEntryProxy extends HttpProxyController
$pluginTpl = PATH_CORE . 'templates' . PATH_SEP . 'processes' . PATH_SEP . 'webentryPost.tpl';
$template = new TemplatePower( $pluginTpl );
$template->prepare();
$template->assign( 'wsdlUrl', $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2' );
$template->assign( 'wsUploadUrl', $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/upload' );
$template->assign( 'wsdlUrl', $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2' );
$template->assign( 'wsUploadUrl', $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/upload' );
$template->assign( 'processUid', $sPRO_UID );
$template->assign( 'dynaformUid', $sDYNAFORM );
$template->assign( 'taskUid', $sTASKS );
@@ -184,7 +184,7 @@ class webEntryProxy extends HttpProxyController
$template->assign( 'dynaform', $dynTitle );
$template->assign( 'timestamp', date( 'l jS \of F Y h:i:s A' ) );
$template->assign( 'ws', SYS_SYS );
$template->assign( 'ws', config("system.workspace") );
$template->assign( 'version', System::getVersion() );
$fileName = $pathProcess . $dynTitle . 'Post.php';
@@ -218,7 +218,7 @@ class webEntryProxy extends HttpProxyController
$aDataEvent['EVN_CONDITIONS'] = $sWS_USER;
$output = $oEvent->update( $aDataEvent );
$link = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/' . $sPRO_UID . '/' . $dynTitle . '.php';
$link = $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/' . $sPRO_UID . '/' . $dynTitle . '.php';
$this->success = true;
$this->msg = G::LoadTranslation( 'ID_WEB_ENTRY_SUCCESS_NEW' );

View File

@@ -44,6 +44,7 @@ INSERT INTO CONTENT (CON_CATEGORY,CON_PARENT,CON_ID,CON_LANG,CON_VALUE) VALUES
('PER_NAME','','00000000000000000000000000000036','en','Delete process cases'),
('PER_NAME','','00000000000000000000000000000037','en','Edit personal info Calendar'),
('PER_NAME','','00000000000000000000000000000038','en','Undo cancel case'),
('PER_NAME','','00000000000000000000000000000039','en','Register External Applications'),
('PER_NAME','','00000000000000000000000000000040','en','Edit User profile First Name'),
('PER_NAME','','00000000000000000000000000000041','en','Edit User profile Last Name'),
('PER_NAME','','00000000000000000000000000000042','en','Edit User profile Username'),
@@ -1730,7 +1731,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'JAVASCRIPT','ID_DBS_NEW','en','Add new Database Source','2014-01-15') ,
( 'JAVASCRIPT','ID_DBS_LIST','en','Databases Source List','2014-01-15') ,
( 'LABEL','ID_CHANGES_SAVED','en','Changes saved','2014-01-15') ,
( 'LABEL','ID_EMAILS','en','EMAILS','2014-01-15') ,
( 'LABEL','ID_EMAILS','en','Emails','2017-10-18') ,
( 'LABEL','ID_REPORT2','en','Number of cases per process','2014-01-15') ,
( 'LABEL','ID_REPORT1','en','Case duration by process and task','2014-01-15') ,
( 'LABEL','ID_IUD','en','#','2014-01-15') ,
@@ -2346,7 +2347,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'JAVASCRIPT','ID_EXIST_INPUTDOCUMENT','en','Can not save, because there is an Input Document with the same name in this process.','2014-01-15') ,
( 'JAVASCRIPT','ID_EXIST_OUTPUTDOCUMENT','en','Can not save, because, there is an Output Document with the same name in this process.','2014-01-15') ,
( 'LABEL','ID_CASE_SCHEDULER_VALIDATE_ALERT','en','User or password is empty.','2014-10-21') ,
( 'LABEL','ID_DELEGATE_DATE_FROM','en','Delegated date from','2014-01-15') ,
( 'LABEL','ID_DELEGATE_DATE_FROM','en','Date from','2017-10-18') ,
( 'JAVASCRIPT','ID_DUPLICATE_CATEGORY_NAME','en','Duplicate category name.','2014-01-15') ;
INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ) VALUES
@@ -2606,7 +2607,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_FIRSTNAME','en','First Name','2014-01-15') ,
( 'LABEL','ID_LASTNAME','en','Last Name','2014-01-15') ,
( 'LABEL','ID_REASSIGNMENT_SUCCESS','en','Case #{APP_NUMBER} was reassigned to user {USER}.','2014-01-15') ,
( 'LABEL','ID_REASSIGN_CONFIRM','en','Are you sure to reassign the current case?','2014-01-15') ,
( 'LABEL','ID_REASSIGN_CONFIRM','en','Do you want to reassign the case?','2017-10-18') ,
( 'LABEL','ID_CASE_PAUSED_SUCCESSFULLY','en','The Case {APP_NUMBER} was paused successfully and it will be unpaused on date {UNPAUSE_DATE}','2014-01-15') ,
( 'LABEL','ID_VACATION','en','Vacation','2014-01-15') ,
( 'JAVASCRIPT','ID_DB_CONNECTION_ASSIGN','en','You cannot delete this database connection. It is assigned to a step.','2014-01-15') ,
@@ -3226,7 +3227,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_TABLES_TO_EXPORT','en','Tables To Export','2014-01-15') ,
( 'LABEL','ID_PMTABLES_NOTICE_EXPORT','en','From each table select at least one Schema/Data to export.','2014-10-21') ,
( 'LABEL','ID_CONFIRM_DELETE_SKIN','en','Do you want to delete the selected skin?','2017-04-21') ,
( 'LABEL','ID_MESSAGE_SUBJECT_NOTE_NOTIFICATION','en','A note has been added to the case.','2014-10-21') ,
( 'LABEL','ID_MESSAGE_SUBJECT_NOTE_NOTIFICATION','en','A note has been added to the case','2017-10-18') ,
( 'LABEL','ID_MSG_CANNOT_EXPORT_DEFAULT_SKIN','en','Default skin can''t be exported. Instead create new one based on default','2014-01-15') ,
( 'LABEL','ID_MSG_CANNOT_EXPORT_SKIN','en','Can''t export skin. Server Error','2014-01-15') ,
( 'LABEL','ID_NEW_SKIN','en','New Skin','2014-01-15') ,
@@ -3867,6 +3868,9 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_EVENT_DESCRIPTION','en','Event Description','2014-01-15') ,
( 'LABEL','ID_EVENT_ACTION','en','Event Type','2014-01-15') ,
( 'LABEL','ID_EVENTS','en','Events','2014-01-15') ,
( 'LABEL','ID_EVENTS_CLASSIC','en','Events (classic processes)','2017-13-10') ,
( 'LABEL','ID_CASE_SCHEDULER_CLASSIC','en','Case Scheduler (classic processes)','2017-13-10') ,
( 'LABEL','ID_PROCESS_IS_REQUIRED','en','Process field is required','2017-13-10') ,
( 'LABEL','ID_EVENT_LIST','en','Log of events','2014-01-15') ,
( 'LABEL','ID_EMPTY_TYPE','en','Select a Type','2014-01-15') ,
( 'LABEL','ID_GRID_PAGE_NO_EVENT_MESSAGE','en','No Events to display','2014-01-15') ,
@@ -4624,7 +4628,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_DASH_COMPARE_MONTH','en','Compare this month with','2015-05-26') ,
( 'LABEL','ID_DASH_COMPARE','en','Compare','2015-03-18') ,
( 'LABEL','ID_DASH_CLICK_TO_VIEW','en','You can click on one of the dashboards to view the data or click on the favorite icon to make it your main dashboard.','2015-03-18') ,
( 'LABEL','ID_SET_NO_MANAGER','en','No set Manager','2015-03-18') ,
( 'LABEL','ID_SET_NO_MANAGER','en','Unassign Manager','2017-10-18') ,
( 'LABEL','ID_NO_SET_MANAGER_SUCCES','en','Manager unassigned correctly','2015-03-18') ,
( 'LABEL','ID_INDICATOR_PROCESS_REQUIRED','en','The field Process of indicator "{0}" is required.','2015-03-18') ,
( 'LABEL','ID_INDICATOR_TITLE_REQUIRED','en','The field Title of indicator "{0}" is required.','2015-03-18') ,
@@ -4661,7 +4665,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_UNTITLED_TASK','en','Untitled task','2015-04-01') ,
( 'LABEL','ID_GOAL_HELP','en','(Goal value)','2015-04-06') ,
( 'LABEL','ID_PLEASE_ENTER_CREDENTIALS','en','Please enter your credentials below','2015-04-09') ,
( 'LABEL','ID_ERROR_EMAIL','en','Error email','2015-04-20') ,
( 'LABEL','ID_ERROR_EMAIL','en','Error','2017-10-18') ,
( 'LABEL','ID_AVAILABLE_DATABASE','en','Available.','2015-04-21') ,
( 'LABEL','ID_NOT_AVAILABLE_DATABASE','en','Not available.','2015-04-21') ,
( 'LABEL','ID_WRONG_USER_PASS','en','Wrong username or password.','2015-04-22') ,
@@ -6124,7 +6128,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_YOU_DO_NOT_HAVE_PERMISSION','en','Error: You do not have permission.','2016-06-15') ,
( 'LABEL','ID_THE_APPLICATION_IS_NOT_CANCELED','en','Error: The application {0} is not canceled.','2016-06-15') ,
( 'LABEL','ID_THREAD_STATUS_DOES_NOT_EXIST_FOR_THE_APPLICATION','en','Error: Thread status does not exist for the application {0}.','2016-06-15') ,
( 'LABEL','ID_NO_PREVIOUS_USR_UID','en','The previuos task doesn''t have any users.','2016-06-17') ,
( 'LABEL','ID_NO_PREVIOUS_USR_UID','en','The previous task doesn''t have any users.','2017-10-18') ,
( 'LABEL','ID_WARNING_GATEWAY_CONVERGENT_WITH_CONDITION','en','Your Gateway Convergent has a condition, save again your process.','2016-06-23') ,
( 'LABEL','ID_RT_RENAME_NAME_TABLE','en','All references to the previous table name are going to be invalid. Do you really want to change the table name?','2016-06-29') ,
( 'LABEL','ID_RT_CONTINUE_TABLE_RENAME','en','Continue renaming the table','2016-06-30') ;

View File

@@ -202,10 +202,10 @@ if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') === 1 && $RBAC->userCanAccess('PM_U
}
if ($RBAC->userCanAccess('PM_SETUP') === 1 && $RBAC->userCanAccess('PM_SETUP_LOGS') === 1) {
$G_TMP_MENU->AddIdRawOption('EVENT', '../events/eventList', G::LoadTranslation('ID_EVENTS'), '', '', 'logs');
$G_TMP_MENU->AddIdRawOption('EVENT', '../events/eventList', G::LoadTranslation('ID_EVENTS_CLASSIC'), '', '', 'logs');
$G_TMP_MENU->AddIdRawOption(
'LOG_CASE_SCHEDULER', '../cases/cases_Scheduler_Log',
G::LoadTranslation('ID_CASE_SCHEDULER'),
G::LoadTranslation('ID_CASE_SCHEDULER_CLASSIC'),
"icon-logs-list.png", '', 'logs'
);
$G_TMP_MENU->AddIdRawOption("CRON", "../setup/cron", G::LoadTranslation("ID_CRON_ACTIONS"), null, null, 'logs');

View File

@@ -263,7 +263,7 @@ if ($sStatus == '1') {
$oAdditionalTables->createPropelClasses($tableName, $sClassName, $aFieldsClases, $sTasUid);
} else {
$sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
@unlink($sPath . $sClassName . '.php');
@unlink($sPath . $sClassName . 'Peer.php');
@unlink($sPath . PATH_SEP . 'map' . PATH_SEP . $sClassName . 'MapBuilder.php');

View File

@@ -71,7 +71,7 @@ while ($rsSql->next()) {
}
if (count($arrayTabItem) > 0) {
$urlProxy = System::getHttpServerHostnameRequestsFrontEnd() . '/api/1.0/' . SYS_SYS . '/consolidated/';
$urlProxy = System::getHttpServerHostnameRequestsFrontEnd() . '/api/1.0/' . config("system.workspace") . '/consolidated/';
$clientId = 'x-pm-local-client';
$client = getClientCredentials($clientId);
$authCode = getAuthorizationCode($client);

View File

@@ -176,9 +176,9 @@ if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjB
if (isset($_COOKIE['dashboardListInbox'])) {
$oHeadPublisher->assign('valueFilterStatus', $_COOKIE['dashboardListInbox']);
if (PHP_VERSION < 5.2) {
setcookie("dashboardListInbox", '', time() + (24 * 60 * 60), "/sys" . SYS_SYS, "; HttpOnly");
setcookie("dashboardListInbox", '', time() + (24 * 60 * 60), "/sys" . config("system.workspace"), "; HttpOnly");
} else {
setcookie("dashboardListInbox", '', time() + (24 * 60 * 60), "/sys" . SYS_SYS, null, false, true);
setcookie("dashboardListInbox", '', time() + (24 * 60 * 60), "/sys" . config("system.workspace"), null, false, true);
}
}
}

View File

@@ -142,8 +142,8 @@ if (isset( $_FILES["form"]["name"] ) && count( $_FILES["form"]["name"] ) > 0) {
if($res->status == 0){
$message = $res->message;
G::SendMessageText( $message, "ERROR" );
$backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
$backUrlObj = explode( "sys" . config("system.workspace"), $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . config("system.workspace") . $backUrlObj[1] );
die();
}
@@ -156,8 +156,8 @@ if (isset( $_FILES["form"]["name"] ) && count( $_FILES["form"]["name"] ) > 0) {
if ($inpDocMaxFilesize > 0 && $fileSizeByField > 0) {
if ($fileSizeByField > $inpDocMaxFilesize) {
G::SendMessageText(G::LoadTranslation("ID_SIZE_VERY_LARGE_PERMITTED"), "ERROR");
$arrayAux1 = explode("sys" . SYS_SYS, $_SERVER["HTTP_REFERER"]);
G::header("location: /sys" . SYS_SYS . $arrayAux1[1]);
$arrayAux1 = explode("sys" . config("system.workspace"), $_SERVER["HTTP_REFERER"]);
G::header("location: /sys" . config("system.workspace") . $arrayAux1[1]);
exit(0);
}
}

View File

@@ -54,8 +54,8 @@ if ((isset( $_FILES['form'] )) && ($_FILES['form']['error']['APP_DOC_FILENAME']
break;
}
G::SendMessageText( $message, "ERROR" );
$backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
$backUrlObj = explode( "sys" . config("system.workspace"), $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . config("system.workspace") . $backUrlObj[1] );
die();
}
@@ -106,8 +106,8 @@ if(isset($_FILES["form"]["name"]["APP_DOC_FILENAME"]) && isset($_FILES["form"]["
if($res->status == 0){
$message = $res->message;
G::SendMessageText( $message, "ERROR" );
$backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
$backUrlObj = explode( "sys" . config("system.workspace"), $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . config("system.workspace") . $backUrlObj[1] );
die();
}
@@ -134,8 +134,8 @@ if (isset($_FILES) && isset($_FILES["form"]) && count($_FILES["form"]) > 0) {
} catch (Exception $e) {
G::SendMessageText($e->getMessage(), "ERROR");
$arrayAux = explode("sys" . SYS_SYS, $_SERVER["HTTP_REFERER"]);
G::header("location: /sys" . SYS_SYS . $arrayAux[1]);
$arrayAux = explode("sys" . config("system.workspace"), $_SERVER["HTTP_REFERER"]);
G::header("location: /sys" . config("system.workspace") . $arrayAux[1]);
exit(0);
}
}

View File

@@ -40,7 +40,7 @@ if (G::is_https()) {
$http = 'http://';
}
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
$client = new SoapClient($endpoint, $streamContext);
$user = $sWS_USER;

View File

@@ -109,8 +109,8 @@ if (! $sw_file_exists) {
print G::json_encode( $res );
} else {
G::SendMessageText( $error_message, "ERROR" );
$backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
$backUrlObj = explode( "sys" . config("system.workspace"), $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . config("system.workspace") . $backUrlObj[1] );
die();
}

View File

@@ -122,8 +122,8 @@ if (!$sw_file_exists) {
print G::json_encode( $res );
} else {
G::SendMessageText( $error_message, "ERROR" );
$backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
$backUrlObj = explode( "sys" . config("system.workspace"), $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . config("system.workspace") . $backUrlObj[1] );
die();
}

View File

@@ -29,7 +29,7 @@ $oHeadPublisher->addExtJsScript( "cases/main", false ); //Adding a javascript fi
$oHeadPublisher->addContent( "cases/main" ); //Adding a html file .html.
$keyMem = "USER_PREFERENCES" . $_SESSION["USER_LOGGED"];
$memcache = &PMmemcached::getSingleton( SYS_SYS );
$memcache = &PMmemcached::getSingleton( config("system.workspace") );
if (($arrayConfig = $memcache->get( $keyMem )) === false) {
$conf->loadConfig( $x, "USER_PREFERENCES", "", "", $_SESSION["USER_LOGGED"], "" );

View File

@@ -9,7 +9,7 @@ $oHeadPublisher = &headPublisher::getSingleton();
if (isset($licenseManager->date) && is_array($licenseManager->date)) {
$conf = new Configurations();
if ( defined('SYS_SYS') && $conf->exists("ENVIRONMENT_SETTINGS")) {
if (!empty(config("system.workspace")) && $conf->exists("ENVIRONMENT_SETTINGS")) {
$licenseManager->date['START'] = date("Y-m-d H:i:s", strtotime($licenseManager->date['HUMAN']['START']));
$licenseManager->date['END'] = date("Y-m-d H:i:s", strtotime($licenseManager->date['HUMAN']['END']));
$licenseManager->date['START'] = $conf->getSystemDate($licenseManager->date['START']);
@@ -63,7 +63,7 @@ $oHeadPublisher->assign("supportStartDate", (isset($licenseManager->supportStart
$oHeadPublisher->assign("supportEndDate", (isset($licenseManager->supportEndDate))? $licenseManager->supportEndDate : '');
$oHeadPublisher->assign("PROCESSMAKER_VERSION", System::getVersion());
$oHeadPublisher->assign("PROCESSMAKER_URL", "/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN );
$oHeadPublisher->assign("PROCESSMAKER_URL", "/sys" . config("system.workspace") . "/" . SYS_LANG . "/" . SYS_SKIN );
$oHeadPublisher->assign("SYS_SKIN", SYS_SKIN);
$oHeadPublisher->assign("URL_PART_LOGIN", ((substr(SYS_SKIN, 0, 2) == "ux" && SYS_SKIN != "uxs")? "main/login" : "login/login"));
$oHeadPublisher->assign("URL_PART_SETUP", EnterpriseUtils::getUrlPartSetup());

View File

@@ -160,7 +160,7 @@ try {
}
///////
$workspace = SYS_SYS;
$workspace = config("system.workspace");
$dbAdapter = DB_ADAPTER;
$addon->setAddonState("download-start");

View File

@@ -8,7 +8,7 @@ if (!defined("PATH_PM_ENTERPRISE")) {
}
if (!defined("PATH_DATA_SITE")) {
define("PATH_DATA_SITE", PATH_DATA . "sites/" . SYS_SYS . "/");
define("PATH_DATA_SITE", PATH_DATA . "sites/" . config("system.workspace") . "/");
}
set_include_path(PATH_PM_ENTERPRISE . PATH_SEPARATOR . get_include_path());
@@ -78,12 +78,10 @@ class enterprisePlugin extends PMPlugin
unset($_SESSION["__EE_SW_PMLICENSEMANAGER__"]);
///////
$js = "window.open(\"/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/setup/main?s=PLUGINS\", \"_top\", \"\");";
$js = "window.open(\"/sys" . config("system.workspace") . "/" . SYS_LANG . "/" . SYS_SKIN . "/setup/main?s=PLUGINS\", \"_top\", \"\");";
if (substr(SYS_SKIN, 0, 2) == "ux" && SYS_SKIN != "uxs") {
//$js = "parent.window.location.href = \"/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/setup/main_init?s=PLUGINS\";";
//$js = "window.location.href = \"/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/setup/pluginsImport\";";
$js = "window.open(\"/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/main\", \"_top\", \"\");";
$js = "window.open(\"/sys" . config("system.workspace") . "/" . SYS_LANG . "/" . SYS_SKIN . "/main\", \"_top\", \"\");";
}
///////

View File

@@ -63,7 +63,7 @@ function install($file)
$context = stream_context_create($option);
///////
$fileData = @fopen(EnterpriseUtils::getUrlServerName() . "/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/enterprise/services/processMakerUpgrade", "rb", false, $context);
$fileData = @fopen(EnterpriseUtils::getUrlServerName() . "/sys" . config("system.workspace") . "/" . SYS_LANG . "/" . SYS_SKIN . "/enterprise/services/processMakerUpgrade", "rb", false, $context);
if ($fileData === false) {
throw (new Exception("Could not open services url."));

View File

@@ -146,7 +146,7 @@ try {
$errLabel = G::LoadTranslation('ID_ACCOUNT') . ' "' . $usr . '" ' . G::LoadTranslation('ID_ACCOUNT_DISABLED_CONTACT_ADMIN');
}
//Log failed authentications
$message = "| Many failed authentication attempts for USER: " . $usr . " | IP: " . G::getIpAddress() . " | WS: " . SYS_SYS;
$message = "| Many failed authentication attempts for USER: " . $usr . " | IP: " . G::getIpAddress() . " | WS: " . config("system.workspace");
$message .= " | BROWSER: " . $_SERVER['HTTP_USER_AGENT'];
G::log($message, PATH_DATA, 'loginFailed.log');
@@ -171,7 +171,7 @@ try {
}
if (!isset( $_SESSION['WORKSPACE'] ) ) {
$_SESSION['WORKSPACE'] = SYS_SYS;
$_SESSION['WORKSPACE'] = config("system.workspace");
}
//Execute the SSO Script from plugin
@@ -248,7 +248,7 @@ try {
$userTimeZone = $user->getUsrTimeZone();
if (trim($userTimeZone) == '') {
$arraySystemConfiguration = System::getSystemConfiguration('', '', SYS_SYS);
$arraySystemConfiguration = System::getSystemConfiguration('', '', config("system.workspace"));
$userTimeZone = $arraySystemConfiguration['time_zone'];
}
@@ -409,7 +409,7 @@ try {
die;
}
$configS = System::getSystemConfiguration('', '', SYS_SYS);
$configS = System::getSystemConfiguration('', '', config("system.workspace"));
$activeSession = isset($configS['session_block']) ? !(int)$configS['session_block']:true;
if ($activeSession){
setcookie("PM-TabPrimary", 101010010, time() + (24 * 60 * 60), '/');

View File

@@ -20,7 +20,7 @@ try {
}
header(
'Location: /sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN .
'Location: /sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN .
'/login/login' . (($u != '')? '?u=' . $u : '')
);
@@ -40,7 +40,7 @@ try {
}
/*----------------------------------********---------------------------------*/
$arraySystemConfiguration = System::getSystemConfiguration('', '', SYS_SYS);
$arraySystemConfiguration = System::getSystemConfiguration('', '', config("system.workspace"));
//Set User Time Zone
$user = UsersPeer::retrieveByPK($userUid);

View File

@@ -188,9 +188,9 @@ session_start();
session_regenerate_id();
if (PHP_VERSION < 5.2) {
setcookie("workspaceSkin", SYS_SKIN, time() + (24 * 60 * 60), "/sys" . SYS_SYS, "; HttpOnly");
setcookie("workspaceSkin", SYS_SKIN, time() + (24 * 60 * 60), "/sys" . config("system.workspace"), "; HttpOnly");
} else {
setcookie("workspaceSkin", SYS_SKIN, time() + (24 * 60 * 60), "/sys" . SYS_SYS, null, false, true);
setcookie("workspaceSkin", SYS_SKIN, time() + (24 * 60 * 60), "/sys" . config("system.workspace"), null, false, true);
}
if (strlen($msg) > 0) {
@@ -361,7 +361,7 @@ $flagForgotPassword = isset($oConf->aConfig['login_enableForgotPassword'])
setcookie('PM-Warning', trim(G::LoadTranslation('ID_BLOCKER_MSG'), '*'), time() + (24 * 60 * 60), SYS_URI);
$configS = System::getSystemConfiguration('', '', SYS_SYS);
$configS = System::getSystemConfiguration('', '', config("system.workspace"));
$activeSession = isset($configS['session_block']) ? !(int)$configS['session_block'] : true;
if ($activeSession) {
setcookie("PM-TabPrimary", 101010010, time() + (24 * 60 * 60), '/');

View File

@@ -9,7 +9,7 @@ if (! empty($_GET['error'])) {
$http = G::is_https() ? 'https' : 'http';
$host = $_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] != '80' ? ':' . $_SERVER['SERVER_PORT'] : '');
$endpoint = sprintf('%s://%s/%s/oauth2/token', $http, $host, SYS_SYS);
$endpoint = sprintf('%s://%s/%s/oauth2/token', $http, $host, config("system.workspace"));
$code = empty($_GET['code']) ? 'NN' : $_GET['code'];
$clientId = 'x-pm-local-client';

View File

@@ -19,7 +19,7 @@ class AdditionalTablesConsolidated extends AdditionalTables
$sClassName = $this->getPHPName($sTableName);
}
$sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
if (!file_exists($sPath)) {
G::mk_dir($sPath);
G::mk_dir($sPath . 'map');
@@ -626,7 +626,7 @@ class ajax_con extends WebResource
$oAdditionalTables->createPropelClasses($tableName, $sClassName, $aFieldsClases, $sTasUid);
} else {
$sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
@unlink($sPath . $sClassName . '.php');
@unlink($sPath . $sClassName . 'Peer.php');
@unlink($sPath . PATH_SEP . 'map' . PATH_SEP . $sClassName . 'MapBuilder.php');

View File

@@ -92,7 +92,7 @@ $oHeadPublisher->assign("arrayContextMenuOptionPlugin", $arrayContextMenuOptionP
$oHeadPublisher->assign('extJsViewState', $oHeadPublisher->getExtJsViewState());
$designer = new Designer();
$oHeadPublisher->assign('SYS_SYS', SYS_SYS);
$oHeadPublisher->assign('SYS_SYS', config("system.workspace"));
$oHeadPublisher->assign('SYS_LANG', SYS_LANG);
$oHeadPublisher->assign('SYS_SKIN', SYS_SKIN);
$oHeadPublisher->assign('HTTP_SERVER_HOSTNAME', System::getHttpServerHostnameRequestsFrontEnd());

View File

@@ -33,8 +33,6 @@ $oProcess = new Process();
$oProcess->dir = $dir;
$oProcess->sort = $sort;
//$memcache = & PMmemcached::getSingleton( SYS_SYS );
$memkey = 'no memcache';
$memcacheUsed = 'not used';
$totalCount = 0;

View File

@@ -189,13 +189,13 @@ try {
$filter = new InputFilter();
$form = $_REQUEST;
$filePath = PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "public" . PATH_SEP . $form['PRO_UID'] . PATH_SEP . $form['FILENAME'];
$filePath = PATH_DATA . "sites" . PATH_SEP . config("system.workspace") . PATH_SEP . "public" . PATH_SEP . $form['PRO_UID'] . PATH_SEP . $form['FILENAME'];
if (file_exists($filePath)) {
unlink($filter->validateInput($filePath, 'path'));
$webEntry = new \ProcessMaker\BusinessModel\WebEntry();
$webEntry->deleteClassic($form['PRO_UID'], $filePath);
}
$filePath = PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "public" . PATH_SEP . $form['PRO_UID'] . PATH_SEP . str_replace(".php", "Post", $form['FILENAME']) . ".php";
$filePath = PATH_DATA . "sites" . PATH_SEP . config("system.workspace") . PATH_SEP . "public" . PATH_SEP . $form['PRO_UID'] . PATH_SEP . str_replace(".php", "Post", $form['FILENAME']) . ".php";
if (file_exists($filePath)) {
unlink($filter->validateInput($filePath, 'path'));
}
@@ -900,8 +900,8 @@ try {
$resultArray = array();
$proUid = isset($_REQUEST['PRO_UID']) ? $_REQUEST['PRO_UID'] : '';
$dynUid = isset($_REQUEST['DYN_UID']) ? $_REQUEST['DYN_UID'] : '';
if (is_file(PATH_DATA . '/sites/' . SYS_SYS . '/xmlForms/' . $proUid . '/' . $dynUid . '.xml') && filesize(PATH_DATA . '/sites/' . SYS_SYS . '/xmlForms/' . $proUid . '/' . $dynUid . '.xml') > 0) {
$dyn = new DynaformHandler(PATH_DATA . '/sites/' . SYS_SYS . '/xmlForms/' . $proUid . '/' . $dynUid . '.xml');
if (is_file(PATH_DATA . '/sites/' . config("system.workspace") . '/xmlForms/' . $proUid . '/' . $dynUid . '.xml') && filesize(PATH_DATA . '/sites/' . config("system.workspace") . '/xmlForms/' . $proUid . '/' . $dynUid . '.xml') > 0) {
$dyn = new DynaformHandler(PATH_DATA . '/sites/' . config("system.workspace") . '/xmlForms/' . $proUid . '/' . $dynUid . '.xml');
$dynaformFields[] = $dyn->getFields();
}
foreach ($dynaformFields as $aDynFormFields) {

View File

@@ -6,7 +6,7 @@ if (!isset($_GET["file_hash"])) {
}
$httpStream = new \ProcessMaker\Util\IO\HttpStream();
$outputDir = PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "files" . PATH_SEP . "output" . PATH_SEP;
$outputDir = PATH_DATA . "sites" . PATH_SEP . config("system.workspace") . PATH_SEP . "files" . PATH_SEP . "output" . PATH_SEP;
$fileName = urldecode(base64_decode($_GET["file_hash"]));
$processFile = $outputDir . $fileName;

View File

@@ -24,7 +24,7 @@
use ProcessMaker\Util\Common;
$response = new StdClass();
$outputDir = PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "files" . PATH_SEP . "output" . PATH_SEP;
$outputDir = PATH_DATA . "sites" . PATH_SEP . config("system.workspace") . PATH_SEP . "files" . PATH_SEP . "output" . PATH_SEP;
try {
if(empty($_GET)){

View File

@@ -70,7 +70,7 @@ if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm
if (!empty($arrayTrigger)) {
$cs = new CodeScanner(SYS_SYS);
$cs = new CodeScanner(config("system.workspace"));
$strFoundDisabledCode = "";

View File

@@ -68,8 +68,8 @@ try {
$pluginTpl = PATH_CORE . 'templates' . PATH_SEP . 'processes' . PATH_SEP . 'webentryPost.tpl';
$template = new TemplatePower( $pluginTpl );
$template->prepare();
$template->assign( 'wsdlUrl', $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2' );
$template->assign( 'wsUploadUrl', $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/upload' );
$template->assign( 'wsdlUrl', $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2' );
$template->assign( 'wsUploadUrl', $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/upload' );
$template->assign( 'processUid', $sPRO_UID );
$template->assign( 'dynaformUid', $sDYNAFORM );
$template->assign( 'taskUid', $sTASKS );
@@ -88,7 +88,7 @@ try {
$template->assign( 'dynaform', $dynTitle );
$template->assign( 'timestamp', date( 'l jS \of F Y h:i:s A' ) );
$template->assign( 'ws', SYS_SYS );
$template->assign( 'ws', config("system.workspace") );
$template->assign( 'version', System::getVersion() );
$fileName = $pathProcess . $dynTitle . 'Post.php';
@@ -134,13 +134,13 @@ try {
$aDataEvent['EVN_CONDITIONS'] = $sWS_USER;
$output = $oEvent->update( $aDataEvent );
//Show link
$link = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/' . $sPRO_UID . '/' . $dynTitle . '.php';
$link = $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/' . $sPRO_UID . '/' . $dynTitle . '.php';
print $link;
//print "\n<a href='$link' target='_new' > $link </a>";
} else {
$G_FORM = new Form( $sPRO_UID . '/' . $sDYNAFORM, PATH_DYNAFORM, SYS_LANG, false );
$G_FORM->action = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/cases_StartExternal.php';
$G_FORM->action = $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/cases_StartExternal.php';
$scriptCode = '';
$scriptCode = $G_FORM->render( PATH_CORE . 'templates/' . 'xmlform' . '.html', $scriptCode );
@@ -158,7 +158,7 @@ try {
$template->assign("URL_MABORAK_JS", G::browserCacheFilesUrl("/js/maborak/core/maborak.js"));
$template->assign("URL_TRANSLATION_ENV_JS", G::browserCacheFilesUrl("/jscore/labels/" . SYS_LANG . ".js"));
$template->assign("siteUrl", $http . $_SERVER["HTTP_HOST"]);
$template->assign("sysSys", SYS_SYS);
$template->assign("sysSys", config("system.workspace"));
$template->assign("sysLang", SYS_LANG);
$template->assign("sysSkin", SYS_SKIN);
$template->assign("processUid", $sPRO_UID);

View File

@@ -29,7 +29,7 @@ if (G::is_https()) {
$http = 'http://';
}
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
$client = new SoapClient( $endpoint, $streamContext );
$user = $sWS_USER;

View File

@@ -14,7 +14,7 @@ if (G::is_https())
else
$http = 'http://';
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
@$client = new SoapClient( $endpoint );
$oTask = new Task();

View File

@@ -37,7 +37,7 @@ function AuthenticationBasicHTTP ($realm)
return false;
}
$realm = 'ProcessMaker Filesystem for Workspace ' . SYS_SYS;
$realm = 'ProcessMaker Filesystem for Workspace ' . config("system.workspace");
# Choice an authentification type Digest or Basic
//AuthenticationDigestHTTP($realm, $users, $phpcgi);

View File

@@ -6,7 +6,7 @@ $content = file_get_contents($filewsdl);
$http = G::is_https() ? 'https' : 'http';
$port = $_SERVER['SERVER_PORT'] === '80' ? '' : ':' . $_SERVER['SERVER_PORT'];
$lang = defined('SYS_LANG') ? SYS_LANG : 'en';
$endpoint = $http . '://' . $_SERVER['SERVER_NAME'] . $port . '/sys' . SYS_SYS . '/' . $lang . '/neoclassic/services/soap2';
$endpoint = $http . '://' . $_SERVER['SERVER_NAME'] . $port . '/sys' . config("system.workspace") . '/' . $lang . '/neoclassic/services/soap2';
$content = str_replace("___SOAP_ADDRESS___", $endpoint, $content);

View File

@@ -110,7 +110,7 @@ $response = array ();
switch ($option) {
case "LST":
$pageSize = $_REQUEST["pageSize"];
$workspace = SYS_SYS;
$workspace = config("system.workspace");
$action = $_REQUEST["action"];
$description = $_REQUEST["description"];
$dateFrom = $_REQUEST["dateFrom"];

View File

@@ -116,7 +116,7 @@ $response = array ();
switch ($option) {
case "LST":
$pageSize = $_REQUEST["pageSize"];
$workspace = SYS_SYS;
$workspace = config("system.workspace");
$status = $_REQUEST["status"];
$dateFrom = $_REQUEST["dateFrom"];
$dateTo = $_REQUEST["dateTo"];

View File

@@ -78,7 +78,7 @@ try {
$configuration = new Configurations();
$importResults = $language->import( $languageFile );
$renegerateContent = new WorkspaceTools( SYS_SYS );
$renegerateContent = new WorkspaceTools( config("system.workspace") );
$messs = $renegerateContent->upgradeContent();
$result->msg = G::LoadTranslation( 'IMPORT_LANGUAGE_SUCCESS' ) . "\n";

View File

@@ -19,7 +19,7 @@ switch ($request) {
print (G::json_encode( $result )) ;
break;
case 'saveSettings':
$memcache = & PMmemcached::getSingleton( defined( 'SYS_SYS' ) ? SYS_SYS : '' );
$memcache = & PMmemcached::getSingleton( !empty(config("system.workspace")) ? config("system.workspace") : '' );
$conf = new Configurations();
$conf->loadConfig( $obj, 'ENVIRONMENT_SETTINGS', '' );

View File

@@ -56,7 +56,7 @@ if ($handle = opendir(PATH_PLUGINS)) {
) {
//Check disabled code
$cs = new CodeScanner(SYS_SYS);
$cs = new CodeScanner(config("system.workspace"));
$arrayFoundDisabledCode = array_merge(
$cs->checkDisabledCode("FILE", PATH_PLUGINS . $pluginName . ".php"),

View File

@@ -251,7 +251,7 @@ try {
if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm5CeTJhQlIwN3IxMEkwaG4=")) {
//Check disabled code
$cs = new CodeScanner(SYS_SYS);
$cs = new CodeScanner(config("system.workspace"));
$arrayFoundDisabledCode = array_merge($cs->checkDisabledCode("FILE", $path . $pluginFile), $cs->checkDisabledCode("PATH", $path . $sClassName));

View File

@@ -24,5 +24,5 @@
*/
$RBAC->requirePermissions('PM_SETUP_ADVANCE');
$items = \PMPlugin::getListPluginsManager(SYS_SYS);
$items = \PMPlugin::getListPluginsManager(config("system.workspace"));
echo G::json_encode($items);

View File

@@ -30,7 +30,7 @@ $RBAC->requirePermissions( 'PM_SETUP' );
$headPublisher = & headPublisher::getSingleton();
$headPublisher->addExtJsScript( 'setup/pluginsMain', false );
$headPublisher->assign( "PROCESSMAKER_URL", "/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN );
$headPublisher->assign( "PROCESSMAKER_URL", "/sys" . config("system.workspace") . "/" . SYS_LANG . "/" . SYS_SKIN );
$headPublisher->assign( "SYS_SKIN", SYS_SKIN );
$oPluginRegistry = PluginRegistry::loadSingleton();

View File

@@ -63,7 +63,7 @@ try { //ini_set('display_errors','1');
$snameLogo = changeNamelogo( $snameLogo );
$oConf = new Configurations();
$aConf = Array ('WORKSPACE_LOGO_NAME' => SYS_SYS,'DEFAULT_LOGO_NAME' => $snameLogo
$aConf = Array ('WORKSPACE_LOGO_NAME' => config("system.workspace"),'DEFAULT_LOGO_NAME' => $snameLogo
);
$oConf->aConfig = $aConf;

View File

@@ -162,7 +162,7 @@ function newSkin ($baseSkin = 'classic')
$xmlConfiguration = file_get_contents( $configFileOriginal );
$workspace = ($_REQUEST['workspace'] == 'global') ? '' : SYS_SYS;
$workspace = ($_REQUEST['workspace'] == 'global') ? '' : config("system.workspace");
$xmlConfigurationObj = G::xmlParser($xmlConfiguration);
$skinInformationArray = $xmlConfigurationObj->result["skinConfiguration"]["__CONTENT__"]["information"]["__CONTENT__"];
@@ -282,7 +282,7 @@ function importSkin ()
$configFileFinal = PATH_CUSTOM_SKINS . $skinName . PATH_SEP . 'config.xml';
$xmlConfiguration = file_get_contents( $configFileOriginal );
$workspace = ($_REQUEST['workspace'] == 'global') ? '' : SYS_SYS;
$workspace = ($_REQUEST['workspace'] == 'global') ? '' : config("system.workspace");
$xmlConfigurationObj = G::xmlParser($xmlConfiguration);
$skinInformationArray = $xmlConfigurationObj->result["skinConfiguration"]["__CONTENT__"]["information"]["__CONTENT__"];

View File

@@ -44,7 +44,7 @@ $oHeadPublisher->addExtJsScript( 'setup/skinList', false ); //adding a javascrip
$oHeadPublisher->addContent( 'setup/skinList' ); //adding a html file .html.
$oHeadPublisher->assign( 'CONFIG', $Config );
$oHeadPublisher->assign( 'SYS_SKIN', SYS_SKIN );
$oHeadPublisher->assign( 'SYS_SYS', "sys".SYS_SYS );
$oHeadPublisher->assign( 'SYS_SYS', "sys".config("system.workspace") );
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );

View File

@@ -66,7 +66,7 @@ switch ($_POST['action']) {
if (! isset( $_SESSION['END_POINT'] )) {
$aFields['WS_HOST'] = $_SERVER['HTTP_HOST'];
$aFields['WS_WORKSPACE'] = SYS_SYS;
$aFields['WS_WORKSPACE'] = config("system.workspace");
} else {
if (strpos( $_SESSION['END_POINT'], 'https' ) !== false) {
preg_match( '@^(?:https://)?([^/]+)@i', $_SESSION['END_POINT'], $coincidencias );
@@ -94,15 +94,14 @@ switch ($_POST['action']) {
$_SESSION['_DBArray'] = $_DBArray;
if (! isset( $_SESSION['END_POINT'] )) {
//$wsdl = 'http://'.$_SERVER['HTTP_HOST'].'/sys'.SYS_SYS. '/'. SYS_LANG .'/classic/services/wsdl';
$wsdl = 'http://' . $_SERVER['HTTP_HOST'];
$workspace = SYS_SYS;
$workspace = config("system.workspace");
} else {
$wsdl = $_SESSION['END_POINT'];
$workspace = $_SESSION['WS_WORKSPACE'];
}
$defaultEndpoint = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/classic/services/wsdl2';
$defaultEndpoint = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/classic/services/wsdl2';
$wsdl = isset( $_SESSION['END_POINT'] ) ? $_SESSION['END_POINT'] : $defaultEndpoint;
@@ -144,7 +143,7 @@ try {
if (isset( $_POST["epr"] )) {
$_SESSION['END_POINT'] = $_POST["epr"];
}
$defaultEndpoint = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/classic/services/wsdl2';
$defaultEndpoint = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/classic/services/wsdl2';
$endpoint = isset( $_SESSION['END_POINT'] ) ? $_SESSION['END_POINT'] : $defaultEndpoint;
@@ -616,7 +615,7 @@ try {
$caseNumber = $oCases->getAppNumber();
// generating the path for the template msj
$templateFile = PATH_DB . SYS_SYS . PATH_SEP . 'mailTemplates' . PATH_SEP . $proUid . PATH_SEP . 'tempTemplate.hml';
$templateFile = PATH_DB . config("system.workspace") . PATH_SEP . 'mailTemplates' . PATH_SEP . $proUid . PATH_SEP . 'tempTemplate.hml';
// generating the file adding the msj variable
$messageBody = "message for case: " . $caseNumber . "<br>" . $message;
file_put_contents( $templateFile, $messageBody );
@@ -1461,7 +1460,7 @@ try {
function sendFile ($FILENAME, $USR_UID, $APP_UID, $DEL_INDEX = 1, $DOC_UID = null, $title = null, $comment = null)
{
$defaultEndpoint = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/classic/services/upload';
$defaultEndpoint = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/classic/services/upload';
$upload = isset( $_SESSION['END_POINT'] ) ? $_SESSION['END_POINT'] : $defaultEndpoint;
$DOC_UID = ($DOC_UID != null) ? $DOC_UID : - 1;

View File

@@ -29,7 +29,7 @@ $ses = new DBSession( $dbc );
if (! isset( $_SESSION['END_POINT'] )) {
$aFields['WS_HOST'] = $_SERVER['HTTP_HOST'];
$aFields['WS_WORKSPACE'] = SYS_SYS;
$aFields['WS_WORKSPACE'] = config("system.workspace");
} else {
if (strpos( $_SESSION['END_POINT'], 'https' ) !== false) {
preg_match( '@^(?:https://)?([^/]+)@i', $_SESSION['END_POINT'], $coincidencias );

View File

@@ -65,8 +65,8 @@ if (! $sw_file_exists) {
print G::json_encode( $res );
} else {
G::SendMessageText( $error_message, "ERROR" );
$backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
$backUrlObj = explode( "sys" . config("system.workspace"), $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . config("system.workspace") . $backUrlObj[1] );
die();
}

View File

@@ -68,8 +68,8 @@ if (! $sw_file_exists) {
print G::json_encode( $res );
} else {
G::SendMessageText( $error_message, "ERROR" );
$backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
$backUrlObj = explode( "sys" . config("system.workspace"), $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . config("system.workspace") . $backUrlObj[1] );
die();
}

View File

@@ -61,7 +61,7 @@ if (isset( $sfunction ) && $sfunction == 'lookforNameTrigger') {
) {
//Check disabled code
$cs = new CodeScanner(SYS_SYS);
$cs = new CodeScanner(config("system.workspace"));
$arrayFoundDisabledCode = $cs->checkDisabledCode("SOURCE", $value["TRI_WEBBOT"]);

View File

@@ -33,7 +33,7 @@ if ($licensedFeatures->verifyfeature('w2LL3o4NFNiaDRXcFFCYVpJS3Jsall5dmh0ZWtBTkd
}
/*----------------------------------********---------------------------------*/
$arraySystemConfiguration = System::getSystemConfiguration('', '', SYS_SYS);
$arraySystemConfiguration = System::getSystemConfiguration('', '', config("system.workspace"));
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'users/users', true ); //adding a javascript file .js

View File

@@ -48,7 +48,7 @@ if ($licensedFeatures->verifyfeature('w2LL3o4NFNiaDRXcFFCYVpJS3Jsall5dmh0ZWtBTkd
}
/*----------------------------------********---------------------------------*/
$arraySystemConfiguration = System::getSystemConfiguration('', '', SYS_SYS);
$arraySystemConfiguration = System::getSystemConfiguration('', '', config("system.workspace"));
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'users/users', true ); //adding a javascript file .js

Some files were not shown because too many files have changed in this diff Show More