HOR-3851
This commit is contained in:
@@ -724,7 +724,7 @@ class ActionsByEmail
|
||||
|
||||
if ($flagLogin) {
|
||||
header(
|
||||
'Location: /sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN .
|
||||
'Location: /sys' . config("sys_sys") . '/' . SYS_LANG . '/' . SYS_SKIN .
|
||||
'/login/login?u=' . urlencode($_SERVER['REQUEST_URI'])
|
||||
);
|
||||
|
||||
|
||||
@@ -3177,7 +3177,7 @@ class Cases
|
||||
}
|
||||
$arrayApplicationData['APP_DATA'][$key] = G::json_encode($files);
|
||||
} catch (Exception $e) {
|
||||
Bootstrap::registerMonolog('DeleteFile', 400, $e->getMessage(), $value, SYS_SYS, 'processmaker.log');
|
||||
Bootstrap::registerMonolog('DeleteFile', 400, $e->getMessage(), $value, config("sys_sys"), 'processmaker.log');
|
||||
}
|
||||
}
|
||||
$flagDelete = true;
|
||||
|
||||
@@ -802,8 +802,8 @@ class InputDocument
|
||||
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("sys_sys"), $_SERVER['HTTP_REFERER'] );
|
||||
G::header( "location: " . "/sys" . config("sys_sys") . $backUrlObj[1] );
|
||||
die();
|
||||
}
|
||||
|
||||
@@ -855,9 +855,9 @@ class InputDocument
|
||||
if ($msg != '') {
|
||||
if ($runningWorkflow) {
|
||||
G::SendMessageText($msg, 'ERROR');
|
||||
$backUrlObj = explode('sys' . SYS_SYS, $_SERVER['HTTP_REFERER']);
|
||||
$backUrlObj = explode('sys' . config("sys_sys"), $_SERVER['HTTP_REFERER']);
|
||||
|
||||
G::header('location: ' . '/sys' . SYS_SYS . $backUrlObj[1]);
|
||||
G::header('location: ' . '/sys' . config("sys_sys") . $backUrlObj[1]);
|
||||
exit(0);
|
||||
} else {
|
||||
throw new Exception($msg);
|
||||
@@ -1005,8 +1005,8 @@ class InputDocument
|
||||
}
|
||||
$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("sys_sys"), $_SERVER['HTTP_REFERER']);
|
||||
G::header("location: " . "/sys" . config("sys_sys") . $backUrlObj[1]);
|
||||
die();
|
||||
}
|
||||
|
||||
@@ -1019,8 +1019,8 @@ class InputDocument
|
||||
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("sys_sys"), $_SERVER["HTTP_REFERER"]);
|
||||
G::header("location: /sys" . config("sys_sys") . $arrayAux1[1]);
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
@@ -1035,8 +1035,8 @@ class InputDocument
|
||||
$message = G::LoadTranslation('THE_UPLOAD_OF_PHP_FILES_WAS_DISABLED');
|
||||
Bootstrap::registerMonologPhpUploadExecution('phpUpload', 550, $message, 'processmaker.log');
|
||||
G::SendMessageText($message, "ERROR");
|
||||
$backUrlObj = explode("sys" . SYS_SYS, $_SERVER['HTTP_REFERER']);
|
||||
G::header("location: " . "/sys" . SYS_SYS . $backUrlObj[1]);
|
||||
$backUrlObj = explode("sys" . config("sys_sys"), $_SERVER['HTTP_REFERER']);
|
||||
G::header("location: " . "/sys" . config("sys_sys") . $backUrlObj[1]);
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
@@ -281,7 +281,7 @@ class Consolidated
|
||||
$className = $tableName;
|
||||
|
||||
if (!class_exists($className)) {
|
||||
require_once(PATH_DB . SYS_SYS . PATH_SEP . "classes" . PATH_SEP . $className . ".php");
|
||||
require_once(PATH_DB . config("sys_sys") . PATH_SEP . "classes" . PATH_SEP . $className . ".php");
|
||||
}
|
||||
|
||||
$oCriteria = new Criteria("workflow");
|
||||
@@ -908,7 +908,7 @@ class Consolidated
|
||||
}
|
||||
}
|
||||
|
||||
@unlink(PATH_C . "ws" . PATH_SEP . SYS_SYS . PATH_SEP . "xmlform" . PATH_SEP . $pro_uid . PATH_SEP . $dyn_uid . "." . SYS_LANG);
|
||||
@unlink(PATH_C . "ws" . PATH_SEP . config("sys_sys") . PATH_SEP . "xmlform" . PATH_SEP . $pro_uid . PATH_SEP . $dyn_uid . "." . SYS_LANG);
|
||||
|
||||
|
||||
$array ['columnModel'] = $caseColumns;
|
||||
|
||||
@@ -475,7 +475,7 @@ class EmailEvent
|
||||
\PMFSendMessage($appUID, $configEmailData['MESS_ACCOUNT'], $emailTo, '', '', $subject,
|
||||
$contentFile['prf_filename'], array(), array(), true, 0, $configEmailData);
|
||||
} else {
|
||||
\Bootstrap::registerMonolog('EmailEventMailError', 200, \G::LoadTranslation('ID_EMAIL_EVENT_CONFIGURATION_EMAIL', array($eventUid, $prj_uid)), ['eventUid' => $eventUid, 'prj_uid' => $prj_uid], SYS_SYS, 'processmaker.log');
|
||||
\Bootstrap::registerMonolog('EmailEventMailError', 200, \G::LoadTranslation('ID_EMAIL_EVENT_CONFIGURATION_EMAIL', array($eventUid, $prj_uid)), ['eventUid' => $eventUid, 'prj_uid' => $prj_uid], config("sys_sys"), 'processmaker.log');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ class EmailServer
|
||||
$currentUser = $RBAC->aUserInfo['USER_INFO'];
|
||||
$info = array(
|
||||
'ip' => G::getIpAddress(),
|
||||
'workspace' => (defined("SYS_SYS")) ? SYS_SYS : "Workspace undefined",
|
||||
'workspace' => (defined("SYS_SYS")) ? config("sys_sys") : "Workspace undefined",
|
||||
'usrUid' => $currentUser['USR_UID']
|
||||
);
|
||||
$this->setContextLog($info);
|
||||
|
||||
@@ -328,7 +328,7 @@ class Light
|
||||
|
||||
//Log
|
||||
Bootstrap::registerMonolog('MobileCreateCase', 200, "Create case",
|
||||
['application_uid' => $aData['APPLICATION'], 'usr_uid' => $userId], SYS_SYS, 'processmaker.log');
|
||||
['application_uid' => $aData['APPLICATION'], 'usr_uid' => $userId], config("sys_sys"), 'processmaker.log');
|
||||
} catch (Exception $e) {
|
||||
$response['status'] = 'failure';
|
||||
$response['message'] = $e->getMessage();
|
||||
@@ -574,7 +574,7 @@ class Light
|
||||
|
||||
//Log
|
||||
Bootstrap::registerMonolog('MobileRouteCase', 200, 'Route case',
|
||||
['application_uid' => $applicationUid, 'usr_uid' => $userUid], SYS_SYS, 'processmaker.log');
|
||||
['application_uid' => $applicationUid, 'usr_uid' => $userUid], config("sys_sys"), 'processmaker.log');
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
@@ -807,7 +807,7 @@ class Light
|
||||
session_start();
|
||||
session_regenerate_id();
|
||||
|
||||
setcookie("workspaceSkin", SYS_SKIN, time() + (24 * 60 * 60), "/sys" . SYS_SYS, null, false, true);
|
||||
setcookie("workspaceSkin", SYS_SKIN, time() + (24 * 60 * 60), "/sys" . config("sys_sys"), null, false, true);
|
||||
|
||||
if (strlen($msg) > 0) {
|
||||
$_SESSION['G_MESSAGE'] = $msg;
|
||||
@@ -1236,7 +1236,7 @@ class Light
|
||||
public function getUsersToReassign($usr_uid, $task_uid)
|
||||
{
|
||||
|
||||
$memcache = PMmemcached::getSingleton(SYS_SYS);
|
||||
$memcache = PMmemcached::getSingleton(config("sys_sys"));
|
||||
$RBAC = RBAC::getSingleton(PATH_DATA, session_id());
|
||||
$RBAC->sSystem = 'PROCESSMAKER';
|
||||
$RBAC->initRBAC();
|
||||
@@ -1323,7 +1323,7 @@ class Light
|
||||
*/
|
||||
public function getConfiguration($params)
|
||||
{
|
||||
$sysConf = Bootstrap::getSystemConfiguration('', '', SYS_SYS);
|
||||
$sysConf = Bootstrap::getSystemConfiguration('', '', config("sys_sys"));
|
||||
$multiTimeZone = false;
|
||||
//Set Time Zone
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
@@ -12,7 +12,7 @@ class NotificationDevice
|
||||
|
||||
public function checkMobileNotifications()
|
||||
{
|
||||
$conf = System::getSystemConfiguration('', '', SYS_SYS);
|
||||
$conf = System::getSystemConfiguration('', '', config("sys_sys"));
|
||||
$activeNotifications = true;
|
||||
if (isset($conf['mobileNotifications'])) {
|
||||
$activeNotifications = $conf['mobileNotifications'] == 1 ? true : false;
|
||||
|
||||
@@ -371,7 +371,7 @@ class MessageApplication
|
||||
$ws = new \WsBase();
|
||||
$case = new \Cases();
|
||||
$common = new \ProcessMaker\Util\Common();
|
||||
$sysSys = (defined("SYS_SYS"))? SYS_SYS : "Undefined";
|
||||
$sysSys = (defined("SYS_SYS"))? config("sys_sys") : "Undefined";
|
||||
|
||||
$common->setFrontEnd($frontEnd);
|
||||
|
||||
@@ -683,7 +683,7 @@ class MessageApplication
|
||||
)
|
||||
{
|
||||
try {
|
||||
\Bootstrap::registerMonolog('MessageEventCron', $level, $message, $aContext, SYS_SYS, 'processmaker.log');
|
||||
\Bootstrap::registerMonolog('MessageEventCron', $level, $message, $aContext, config("sys_sys"), 'processmaker.log');
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ class FileHandler
|
||||
{
|
||||
$workflowFile = array();
|
||||
$workspaceTargetDir = ($target === 'PUBLIC') ? 'public' : 'mailTemplates';
|
||||
$workspaceDir = PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP;
|
||||
$workspaceDir = PATH_DATA . "sites" . PATH_SEP . config("sys_sys") . PATH_SEP;
|
||||
|
||||
$templatesDir = $workspaceDir . $workspaceTargetDir . PATH_SEP . $prj_uid;
|
||||
$templatesFiles = Util\Common::rglob("$templatesDir/*", 0, true);
|
||||
|
||||
@@ -44,7 +44,7 @@ class FilesMigrator implements Importable, Exportable
|
||||
}
|
||||
$aPath = $data['PATH'];
|
||||
foreach ($aPath as $target => $files) {
|
||||
$basePath = PATH_DATA . 'sites' . PATH_SEP . SYS_SYS . PATH_SEP . 'public' . PATH_SEP;
|
||||
$basePath = PATH_DATA . 'sites' . PATH_SEP . config("sys_sys") . PATH_SEP . 'public' . PATH_SEP;
|
||||
if (strtoupper($target) === 'PUBLIC') {
|
||||
foreach ($files as $file) {
|
||||
$filename = $basePath . ((isset($file["file_path"])) ? $file["file_path"] : $file["filepath"]);
|
||||
|
||||
@@ -65,7 +65,7 @@ class GranularExporter
|
||||
$projectData = $bpmnProject->getProject();
|
||||
$this->prjName = $projectData['PRJ_NAME'];
|
||||
$getProjectName = $this->publisher->truncateName($projectData['PRJ_NAME'], false);
|
||||
$outputDir = PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "files" . PATH_SEP . "output" . PATH_SEP;
|
||||
$outputDir = PATH_DATA . "sites" . PATH_SEP . config("sys_sys") . PATH_SEP . "files" . PATH_SEP . "output" . PATH_SEP;
|
||||
$version = Common::getLastVersionSpecialCharacters($outputDir, $getProjectName, "pmx2") + 1;
|
||||
$outputFilename = $outputDir . sprintf("%s-%s.%s", str_replace(" ", "_", $getProjectName), $version, "pmx2");
|
||||
|
||||
@@ -143,7 +143,7 @@ class GranularExporter
|
||||
"export_server_os" => PHP_OS ,
|
||||
"export_server_php_version" => PHP_VERSION_ID,
|
||||
);
|
||||
$data["metadata"]["workspace"] = defined("SYS_SYS") ? SYS_SYS : "Unknown";
|
||||
$data["metadata"]["workspace"] = defined("SYS_SYS") ? config("sys_sys") : "Unknown";
|
||||
$data["metadata"]["name"] = $projectData['PRJ_NAME'];
|
||||
$data["metadata"]["uid"] = $projectData['PRJ_UID'];
|
||||
$data["metadata"]["export_version"] = $version;
|
||||
|
||||
@@ -44,7 +44,7 @@ class TemplatesMigrator implements Importable, Exportable
|
||||
}
|
||||
$aPath = $data['PATH'];
|
||||
foreach ($aPath as $target => $files) {
|
||||
$basePath = PATH_DATA . 'sites' . PATH_SEP . SYS_SYS . PATH_SEP . 'mailTemplates' . PATH_SEP;
|
||||
$basePath = PATH_DATA . 'sites' . PATH_SEP . config("sys_sys") . PATH_SEP . 'mailTemplates' . PATH_SEP;
|
||||
if (strtoupper($target) === 'TEMPLATE') {
|
||||
foreach ($files as $file) {
|
||||
$filename = $basePath . ((isset($file["file_path"])) ? $file["file_path"] : $file["filepath"]);
|
||||
|
||||
@@ -964,7 +964,7 @@ class Process
|
||||
|
||||
$process = new \Process();
|
||||
|
||||
$memcache = &\PMmemcached::getSingleton(SYS_SYS);
|
||||
$memcache = &\PMmemcached::getSingleton(config("sys_sys"));
|
||||
|
||||
$memkey = "no memcache";
|
||||
$memcacheUsed = "not used";
|
||||
@@ -1775,8 +1775,8 @@ class Process
|
||||
$aInvalidTypes = array("title", "subtitle", "file", "button", "reset", "submit", "javascript");
|
||||
$aMultipleSelectionFields = array("listbox", "checkgroup", "grid");
|
||||
|
||||
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("sys_sys") .'/xmlForms/'. $proUid .'/'.$dynUid. '.xml' ) && filesize( PATH_DATA . '/sites/'. config("sys_sys") .'/xmlForms/'. $proUid .'/'. $dynUid .'.xml' ) > 0) {
|
||||
$dyn = new DynaformHandler( PATH_DATA . '/sites/'. config("sys_sys") .'/xmlForms/' .$proUid. '/' . $dynUid .'.xml' );
|
||||
$dynaformFields[] = $dyn->getFields();
|
||||
|
||||
$fields = $dyn->getFields();
|
||||
|
||||
@@ -227,7 +227,7 @@ class ProjectUser
|
||||
} else {
|
||||
$http = 'http://';
|
||||
}
|
||||
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
|
||||
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . config("sys_sys") . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
|
||||
@$client = new \SoapClient( $endpoint );
|
||||
$user = $sWS_USER;
|
||||
$pass = $sWS_PASS;
|
||||
@@ -325,7 +325,7 @@ class ProjectUser
|
||||
try {
|
||||
$http = (\G::is_https())? "https://" : "http://";
|
||||
|
||||
$client = new \SoapClient($http . $_SERVER["HTTP_HOST"] . "/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/services/wsdl2");
|
||||
$client = new \SoapClient($http . $_SERVER["HTTP_HOST"] . "/sys" . config("sys_sys") . "/" . SYS_LANG . "/" . SYS_SKIN . "/services/wsdl2");
|
||||
|
||||
$params = array(
|
||||
"userid" => $username,
|
||||
|
||||
@@ -99,7 +99,7 @@ class Skins
|
||||
|
||||
$xmlConfiguration = file_get_contents($configFileOriginal);
|
||||
|
||||
$workspace = ($skinWorkspace == 'global') ? '' : SYS_SYS;
|
||||
$workspace = ($skinWorkspace == 'global') ? '' : config("sys_sys");
|
||||
|
||||
$xmlConfigurationObj = G::xmlParser($xmlConfiguration);
|
||||
$skinInformationArray = $xmlConfigurationObj->result["skinConfiguration"]["__CONTENT__"]["information"]["__CONTENT__"];
|
||||
|
||||
@@ -592,7 +592,7 @@ class Table
|
||||
}
|
||||
$className = $table['ADD_TAB_CLASS_NAME'];
|
||||
$classPeerName = $className . 'Peer';
|
||||
$sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
|
||||
$sPath = PATH_DB . config("sys_sys") . PATH_SEP . 'classes' . PATH_SEP;
|
||||
if (! file_exists( $sPath . $className . '.php' )) {
|
||||
throw new \Exception( 'Update:: ' . G::loadTranslation( 'ID_PMTABLE_CLASS_DOESNT_EXIST', $className ) );
|
||||
}
|
||||
@@ -684,7 +684,7 @@ class Table
|
||||
}
|
||||
$className = $table['ADD_TAB_CLASS_NAME'];
|
||||
$classPeerName = $className . 'Peer';
|
||||
$sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
|
||||
$sPath = PATH_DB . config("sys_sys") . PATH_SEP . 'classes' . PATH_SEP;
|
||||
if (! file_exists( $sPath . $className . '.php' )) {
|
||||
throw new \Exception( 'Update:: ' . G::loadTranslation( 'ID_PMTABLE_CLASS_DOESNT_EXIST', $className ) );
|
||||
}
|
||||
|
||||
@@ -1151,7 +1151,7 @@ class TimerEvent
|
||||
private function log($action, $value = "", $status = "action")
|
||||
{
|
||||
try {
|
||||
$workspace = (defined("SYS_SYS"))? SYS_SYS : "Wokspace Undefined";
|
||||
$workspace = (defined("SYS_SYS"))? config("sys_sys") : "Wokspace Undefined";
|
||||
$ipClient = \G::getIpAddress();
|
||||
|
||||
$actionTimer = "timereventcron: ";
|
||||
@@ -1192,7 +1192,7 @@ class TimerEvent
|
||||
)
|
||||
{
|
||||
try {
|
||||
\Bootstrap::registerMonolog('TimerEventCron', $level, $message, $aContext, SYS_SYS, 'processmaker.log');
|
||||
\Bootstrap::registerMonolog('TimerEventCron', $level, $message, $aContext, config("sys_sys"), 'processmaker.log');
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
@@ -1214,7 +1214,7 @@ class TimerEvent
|
||||
$ws = new \WsBase();
|
||||
$case = new \Cases();
|
||||
$common = new \ProcessMaker\Util\Common();
|
||||
$sysSys = (defined("SYS_SYS"))? SYS_SYS : "Undefined";
|
||||
$sysSys = (defined("SYS_SYS"))? config("sys_sys") : "Undefined";
|
||||
|
||||
$common->setFrontEnd($frontEnd);
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ class Trigger
|
||||
) {
|
||||
//Check disabled code
|
||||
|
||||
$cs = new \CodeScanner(SYS_SYS);
|
||||
$cs = new \CodeScanner(config("sys_sys"));
|
||||
|
||||
$arrayFoundDisabledCode = $cs->checkDisabledCode("SOURCE", $dataTrigger["TRI_WEBBOT"]);
|
||||
|
||||
|
||||
@@ -719,7 +719,7 @@ class User
|
||||
$aUserProperty = $userProperty->loadOrCreateIfNotExists($userUid, array("USR_PASSWORD_HISTORY" => serialize(array(Bootstrap::hashPassword($arrayData["USR_PASSWORD"])))));
|
||||
|
||||
$memKey = "rbacSession" . session_id();
|
||||
$memcache = &PMmemcached::getSingleton(defined("SYS_SYS") ? SYS_SYS : "");
|
||||
$memcache = &PMmemcached::getSingleton(defined("SYS_SYS") ? config("sys_sys") : "");
|
||||
|
||||
if (($rbac->aUserInfo = $memcache->get($memKey)) == false) {
|
||||
$rbac->loadUserRolePermission("PROCESSMAKER", $userUidLogged);
|
||||
|
||||
@@ -43,7 +43,7 @@ class WebEntry
|
||||
{
|
||||
$this->pathDataPublic = defined("PATH_DATA_PUBLIC") ? PATH_DATA_PUBLIC : \G::$pathDataPublic;
|
||||
$this->httpHost = isset($_SERVER["HTTP_HOST"]) ? $_SERVER["HTTP_HOST"] : \G::$httpHost;
|
||||
$this->sysSys = defined("SYS_SYS") ? SYS_SYS : \G::$sysSys;
|
||||
$this->sysSys = defined("SYS_SYS") ? config("sys_sys") : \G::$sysSys;
|
||||
$this->sysSkin = defined("SYS_SKIN") ? SYS_SKIN : \G::$sysSkin;
|
||||
try {
|
||||
foreach ($this->arrayFieldDefinition as $key => $value) {
|
||||
@@ -851,7 +851,7 @@ class WebEntry
|
||||
try {
|
||||
if ((!isset($record['WE_LINK_GENERATION']) || $record['WE_LINK_GENERATION']==='DEFAULT') && $record["WE_METHOD"] == "WS") {
|
||||
$http = (\G::is_https())? "https://" : "http://";
|
||||
$url = $http . $_SERVER["HTTP_HOST"] . "/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/" . $record["PRO_UID"];
|
||||
$url = $http . $_SERVER["HTTP_HOST"] . "/sys" . config("sys_sys") . "/" . SYS_LANG . "/" . SYS_SKIN . "/" . $record["PRO_UID"];
|
||||
|
||||
$record["WE_DATA"] = $url . "/" . $record["WE_DATA"];
|
||||
}
|
||||
|
||||
@@ -1350,13 +1350,13 @@ class WebEntryEvent
|
||||
strpos($domain, 'https://') === 0;
|
||||
$url = ($hasProtocol ? '' : $http) .
|
||||
$domain .
|
||||
"/sys" . SYS_SYS . "/" .
|
||||
"/sys" . config("sys_sys") . "/" .
|
||||
$weLinkLanguage . "/" .
|
||||
$weLinkSkin . "/" . $prj_uid;
|
||||
|
||||
return $url . "/" . $weData;
|
||||
} else {
|
||||
$url = $http . $_SERVER["HTTP_HOST"] . "/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/" . $prj_uid;
|
||||
$url = $http . $_SERVER["HTTP_HOST"] . "/sys" . config("sys_sys") . "/" . SYS_LANG . "/" . SYS_SKIN . "/" . $prj_uid;
|
||||
|
||||
return $url . "/" . $weData;
|
||||
}
|
||||
|
||||
@@ -1060,7 +1060,7 @@ class System
|
||||
$workspace = explode("|", $res['SKIN_WORKSPACE']);
|
||||
$swWS = false;
|
||||
foreach ($workspace as $key => $value) {
|
||||
if ($value == SYS_SYS) {
|
||||
if ($value == config("sys_sys")) {
|
||||
$swWS = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ abstract class Exporter
|
||||
$data = array();
|
||||
|
||||
$data["metadata"] = $this->getMetadata();
|
||||
$data["metadata"]["workspace"] = defined("SYS_SYS") ? SYS_SYS : "Unknown";
|
||||
$data["metadata"]["workspace"] = defined("SYS_SYS") ? config("sys_sys") : "Unknown";
|
||||
$data["metadata"]["name"] = $this->getProjectName();
|
||||
$data["metadata"]["uid"] = $this->getProjectUid();
|
||||
|
||||
|
||||
@@ -771,7 +771,7 @@ abstract class Importer
|
||||
$exporter = new \ProcessMaker\Exporter\XmlExporter($prj_uid);
|
||||
$getProjectName = $exporter->truncateName($exporter->getProjectName(), false);
|
||||
|
||||
$outputDir = PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "files" . PATH_SEP . "output" . PATH_SEP;
|
||||
$outputDir = PATH_DATA . "sites" . PATH_SEP . config("sys_sys") . PATH_SEP . "files" . PATH_SEP . "output" . PATH_SEP;
|
||||
$version = Common::getLastVersionSpecialCharacters($outputDir, $getProjectName, "pmx") + 1;
|
||||
$outputFilename = $outputDir . sprintf("%s-%s.%s", str_replace(" ", "_", $getProjectName), $version, "pmx");
|
||||
|
||||
|
||||
@@ -45,8 +45,7 @@ class PluginRegistry
|
||||
use PluginStructure;
|
||||
use Attributes;
|
||||
use Init;
|
||||
|
||||
const NAME_CACHE = SYS_SYS . __CLASS__;
|
||||
|
||||
/**
|
||||
* Instance of de object PluginRegistry
|
||||
* @var PluginRegistry $instance
|
||||
@@ -75,9 +74,9 @@ class PluginRegistry
|
||||
public static function loadSingleton()
|
||||
{
|
||||
if (self::$instance === null) {
|
||||
if (is_null($object = Cache::get(self::NAME_CACHE))) {
|
||||
if (is_null($object = Cache::get(config("sys_sys") . __CLASS__))) {
|
||||
$object = new PluginRegistry();
|
||||
Cache::put(self::NAME_CACHE, $object, config('app.cache_lifetime'));
|
||||
Cache::put(config("sys_sys") . __CLASS__, $object, config('app.cache_lifetime'));
|
||||
}
|
||||
self::$instance = $object;
|
||||
}
|
||||
@@ -202,7 +201,7 @@ class PluginRegistry
|
||||
$fieldPlugin = PluginsRegistry::loadOrCreateIfNotExists(md5($plugin['PLUGIN_NAMESPACE']), $plugin);
|
||||
PluginsRegistry::update($fieldPlugin);
|
||||
}
|
||||
Cache::pull(self::NAME_CACHE);
|
||||
Cache::pull(config("sys_sys") . __CLASS__);
|
||||
}
|
||||
/**
|
||||
* Get the plugin details, by filename
|
||||
|
||||
@@ -138,7 +138,7 @@ class Bpmn extends Handler
|
||||
//Define the variables for the logging
|
||||
$info = array(
|
||||
'ip' => G::getIpAddress(),
|
||||
'workspace' => (defined("SYS_SYS"))? SYS_SYS : "Workspace undefined"
|
||||
'workspace' => (defined("SYS_SYS"))? config("sys_sys") : "Workspace undefined"
|
||||
);
|
||||
$this->setContextLog($info);
|
||||
}
|
||||
|
||||
@@ -1123,10 +1123,10 @@ class Workflow extends Handler
|
||||
$basePath = PATH_DYNAFORM;
|
||||
break;
|
||||
case "PUBLIC":
|
||||
$basePath = PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "public" . PATH_SEP;
|
||||
$basePath = PATH_DATA . "sites" . PATH_SEP . config("sys_sys") . PATH_SEP . "public" . PATH_SEP;
|
||||
break;
|
||||
case "TEMPLATES":
|
||||
$basePath = PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "mailTemplates" . PATH_SEP;
|
||||
$basePath = PATH_DATA . "sites" . PATH_SEP . config("sys_sys") . PATH_SEP . "mailTemplates" . PATH_SEP;
|
||||
break;
|
||||
default:
|
||||
$basePath = "";
|
||||
@@ -1213,7 +1213,7 @@ class Workflow extends Handler
|
||||
|
||||
//Get templates and public files
|
||||
$workspaceTargetDirs = array("TEMPLATES" => "mailTemplates", "PUBLIC" => "public");
|
||||
$workspaceDir = PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP;
|
||||
$workspaceDir = PATH_DATA . "sites" . PATH_SEP . config("sys_sys") . PATH_SEP;
|
||||
|
||||
foreach ($workspaceTargetDirs as $target => $workspaceTargetDir) {
|
||||
$templatesDir = $workspaceDir . $workspaceTargetDir . PATH_SEP . $processUid;
|
||||
|
||||
@@ -189,7 +189,7 @@ class Project extends Api
|
||||
$objects = \G::json_decode($objects);
|
||||
$granularExporter = new GranularExporter($prj_uid);
|
||||
$outputFilename = $granularExporter->export($objects);
|
||||
$outputFilename = PATH_DATA . 'sites' . PATH_SEP . SYS_SYS . PATH_SEP . 'files' . PATH_SEP . 'output' .
|
||||
$outputFilename = PATH_DATA . 'sites' . PATH_SEP . config("sys_sys") . PATH_SEP . 'files' . PATH_SEP . 'output' .
|
||||
PATH_SEP . $outputFilename;
|
||||
$httpStream = new HttpStream();
|
||||
$fileExtension = pathinfo($outputFilename, PATHINFO_EXTENSION);
|
||||
@@ -211,7 +211,7 @@ class Project extends Api
|
||||
$exporter = new \ProcessMaker\Exporter\XmlExporter($prj_uid);
|
||||
$getProjectName = $exporter->truncateName($exporter->getProjectName(), false);
|
||||
|
||||
$outputDir = PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "files" . PATH_SEP . "output" . PATH_SEP;
|
||||
$outputDir = PATH_DATA . "sites" . PATH_SEP . config("sys_sys") . PATH_SEP . "files" . PATH_SEP . "output" . PATH_SEP;
|
||||
$version = Common::getLastVersionSpecialCharacters($outputDir, $getProjectName, "pmx") + 1;
|
||||
$outputFilename = $outputDir . sprintf("%s-%s.%s", str_replace(" ", "_", $getProjectName), $version, "pmx");
|
||||
|
||||
|
||||
@@ -144,8 +144,8 @@ class Server implements iAuthenticate
|
||||
$host = $_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] != '80' ? ':' . $_SERVER['SERVER_PORT'] : '');
|
||||
$host = $http .'://'. $host;
|
||||
|
||||
$applicationsLink = sprintf('%s/%s/oauth2/apps', $host, SYS_SYS);
|
||||
$authorizationLink = sprintf('%s/%s/oauth2/authorize?response_type=code&client_id=[the-client-id]&scope=*', $host, SYS_SYS);
|
||||
$applicationsLink = sprintf('%s/%s/oauth2/apps', $host, config("sys_sys"));
|
||||
$authorizationLink = sprintf('%s/%s/oauth2/authorize?response_type=code&client_id=[the-client-id]&scope=*', $host, config("sys_sys"));
|
||||
|
||||
$view = new \Maveriks\Pattern\Mvc\SmartyView(PATH_CORE . "templates/oauth2/index.html");
|
||||
$view->assign('host', $host);
|
||||
@@ -180,7 +180,7 @@ class Server implements iAuthenticate
|
||||
$host = $http . '://' . $_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] != '80' ? ':' . $_SERVER['SERVER_PORT'] : '');
|
||||
$redirect = urlencode($host.'/'.self::$workspace.$_SERVER['REQUEST_URI']);
|
||||
|
||||
$loginLink = sprintf('%s/sys%s/%s/%s/login/login?u=%s', $host, SYS_SYS, SYS_LANG, SYS_SKIN, $redirect);
|
||||
$loginLink = sprintf('%s/sys%s/%s/%s/login/login?u=%s', $host, config("sys_sys"), SYS_LANG, SYS_SKIN, $redirect);
|
||||
header('location: ' . $loginLink);
|
||||
die;
|
||||
}
|
||||
@@ -214,7 +214,7 @@ class Server implements iAuthenticate
|
||||
$view = new \Maveriks\Pattern\Mvc\SmartyView(PATH_CORE . "templates/oauth2/authorize.html");
|
||||
$view->assign('user', $user);
|
||||
$view->assign('client', $client);
|
||||
$view->assign('postUri', '/' . SYS_SYS . '/oauth2/authorize?' . $_SERVER['QUERY_STRING']);
|
||||
$view->assign('postUri', '/' . config("sys_sys") . '/oauth2/authorize?' . $_SERVER['QUERY_STRING']);
|
||||
$view->render();
|
||||
exit();
|
||||
}
|
||||
@@ -364,7 +364,7 @@ class Server implements iAuthenticate
|
||||
$userTimeZone = $user->getUsrTimeZone();
|
||||
|
||||
if (trim($userTimeZone) == '') {
|
||||
$arraySystemConfiguration = System::getSystemConfiguration('', '', SYS_SYS);
|
||||
$arraySystemConfiguration = System::getSystemConfiguration('', '', config("sys_sys"));
|
||||
|
||||
$userTimeZone = $arraySystemConfiguration['time_zone'];
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ class FixReferencePath
|
||||
*/
|
||||
public function regeneratePropelClasses($repTabName, $className, $fields, $guid)
|
||||
{
|
||||
$sourcePath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
|
||||
$sourcePath = PATH_DB . config("sys_sys") . PATH_SEP . 'classes' . PATH_SEP;
|
||||
|
||||
@unlink($sourcePath . $className . '.php');
|
||||
@unlink($sourcePath . $className . 'Peer.php');
|
||||
|
||||
@@ -27,7 +27,7 @@ class System
|
||||
public static function getTimeZone()
|
||||
{
|
||||
try {
|
||||
$arraySystemConfiguration = PmSystem::getSystemConfiguration('', '', SYS_SYS);
|
||||
$arraySystemConfiguration = PmSystem::getSystemConfiguration('', '', config("sys_sys"));
|
||||
|
||||
//Return
|
||||
return $arraySystemConfiguration['time_zone'];
|
||||
|
||||
@@ -251,8 +251,8 @@ function getVarsGrid($proUid, $dynUid)
|
||||
|
||||
$dynaformFields = array();
|
||||
|
||||
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("sys_sys") . '/xmlForms/' . $proUid . '/' . $dynUid . '.xml') && filesize(PATH_DATA . '/sites/' . config("sys_sys") . '/xmlForms/' . $proUid . '/' . $dynUid . '.xml') > 0) {
|
||||
$dyn = new dynaFormHandler(PATH_DATA . '/sites/' . config("sys_sys") . '/xmlForms/' . $proUid . '/' . $dynUid . '.xml');
|
||||
$dynaformFields[] = $dyn->getFields();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user