This commit is contained in:
Roly Rudy Gutierrez Pinto
2017-10-06 17:21:21 -04:00
parent 958e1255a8
commit 216e2dca28
151 changed files with 402 additions and 373 deletions

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') ,defined( "SYS_SYS" ) ? config("sys_sys") : "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("sys_sys") . "/" . (($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("sys_sys"),
'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("sys_sys"),
$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("sys_sys")]) ? isset($licInfo[config("sys_sys")]['TYPE'])? $licInfo[config("sys_sys")]['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("sys_sys") . '-' . 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("sys_sys") . '/' . 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("sys_sys"));
$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("sys_sys"), '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("sys_sys") . '/' . SYS_LANG . '/' . $sysConf['default_skin'] . '/main';
}
}

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(["sys_sys" => $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( defined( 'SYS_SYS' ) ? config("sys_sys") : '' );
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', defined( 'SYS_SYS' ) ? ucfirst( config("sys_sys") ) : '' );
$this->setVar( 'user_avatar', 'users/users_ViewPhotoGrid?pUID=' . $_SESSION['USER_LOGGED'] . '&h=' . rand() );
// license notification
@@ -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("sys_sys") ))) {
$sCompanyLogo = $oPluginRegistry->getCompanyLogo( $sFotoSelect );
$sCompanyLogo = "/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/adminProxy/showLogoFile?id=" . base64_encode( $sCompanyLogo );
$sCompanyLogo = "/sys" . config("sys_sys") . "/" . 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') ,defined( "SYS_SYS" ) ? config("sys_sys") : "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("sys_sys") . 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("sys_sys"));
$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("sys_sys") . 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("sys_sys") . 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("sys_sys") . 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("sys_sys") . 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("sys_sys") . "\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("sys_sys") . PATH_SEP . 'public' . PATH_SEP;
$filenameOnly = strtolower( 'SYS-' . SYS_SYS . "_" . date( "Y-m-d" ) . '_' . date( "Hi" ) . ".pmt" );
$filenameOnly = strtolower( 'SYS-' . config("sys_sys") . "_" . 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("sys_sys") . '/';
//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("sys_sys"));
$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("sys_sys") . PATH_SEP . "public" . PATH_SEP . $pro_uid . PATH_SEP . $filename );
unlink( PATH_DATA . "sites" . PATH_SEP . config("sys_sys") . 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("sys_sys") . '/' . 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("sys_sys") . PATH_SEP . "public" . PATH_SEP . $pro_uid . PATH_SEP . $filename );
unlink( PATH_DATA . "sites" . PATH_SEP . config("sys_sys") . 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("sys_sys") . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2' );
$template->assign( 'wsUploadUrl', $http . $_SERVER['HTTP_HOST'] . '/sys' . config("sys_sys") . '/' . 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("sys_sys") );
$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("sys_sys") . '/' . SYS_LANG . '/' . SYS_SKIN . '/' . $sPRO_UID . '/' . $dynTitle . '.php';
$this->success = true;
$this->msg = G::LoadTranslation( 'ID_WEB_ENTRY_SUCCESS_NEW' );