Conflicts

This commit is contained in:
Paula Quispe
2017-10-20 18:51:24 -04:00
178 changed files with 2452 additions and 1973 deletions

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

@@ -705,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

@@ -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

@@ -788,18 +788,26 @@ class AppDelegation extends BaseAppDelegation
return $data['TAS_UID'];
}
/**
* This function get the current user related to the specific case and index
* @param string $appUid, Uid related to the case
* @param integer $index, Index to review
* @return array
*/
public function getCurrentUsers($appUid, $index)
{
$oCriteria = new Criteria();
$oCriteria->addSelectColumn( AppDelegationPeer::USR_UID );
$oCriteria->add( AppDelegationPeer::APP_UID, $appUid );
$oCriteria->add( AppDelegationPeer::DEL_THREAD_STATUS, 'OPEN' );
$oCriteria->add( AppDelegationPeer::DEL_INDEX, $index );
$oRuleSet = AppDelegationPeer::doSelectRS( $oCriteria );
$oRuleSet->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oRuleSet->next();
$data = $oRuleSet->getRow();
return $data;
$criteria = new Criteria();
$criteria->addSelectColumn( AppDelegationPeer::USR_UID );
$criteria->add( AppDelegationPeer::APP_UID, $appUid );
$criteria->add( AppDelegationPeer::DEL_THREAD_STATUS, 'OPEN' );
$criteria->add( AppDelegationPeer::DEL_INDEX, $index );
$dataResult = AppDelegationPeer::doSelectRS( $criteria );
$dataResult->setFetchmode( ResultSet::FETCHMODE_ASSOC );
if($dataResult->next()) {
return $dataResult->getRow();
} else {
return [];
}
}
/**

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

@@ -121,34 +121,31 @@ class Language extends BaseLanguage
}
}
/*
/**
* Import a language file
*
* @author Erik Amaru Ortiz <erik@colosa.com, aortiz.erik@gmail>
* @param string $sLanguageFile
* @param string $bXml
* @return void
* @param string $languageFile
* @param bool $updateXml
* @param bool $updateDB
* @param bool $generateMafe
* @return Object
* @throws Exception
*/
public function import ($sLanguageFile, $updateXml = true, $updateDB = true, $generateMafe = true)
public function import($languageFile, $updateXml = true, $updateDB = true, $generateMafe = true)
{
try {
//get labels MichelangeloFE
$translation = new Translation();
try {
$oTranslation = new Translation();
$MichelangeloFE = PATH_HOME . "../workflow/public_html/lib/js";
if (file_exists($MichelangeloFE)) {
$labels = self::readLabelsDirectory($MichelangeloFE, true);
foreach ($labels as $label) {
$oTranslation->addTranslation('LABEL', 'ID_MAFE_' . G::encryptOld($label), 'en', $label);
}
//We get all MichelangeloFE and PMDynaform translatable labels.
$labels = array_merge(self::getLabelsMafe(), self::getLabelsPMDynaform());
foreach ($labels as $label) {
$translation->addTranslation('LABEL', 'ID_MAFE_' . G::encryptOld($label), 'en', $label);
}
} catch (Exception $e) {
error_log($e->getMessage());
}
$POFile = new i18n_PO( $sLanguageFile );
$POFile = new i18n_PO($languageFile);
$POFile->readInit();
$POHeaders = $POFile->getHeaders();
@@ -156,13 +153,13 @@ class Language extends BaseLanguage
$langName = $POHeaders['X-Poedit-Language'];
//find the lang id
$language = new Language();
$langRecord = $language->findByLanName( $langName );
$langRecord = $language->findByLanName($langName);
if (! isset( $langRecord['LAN_ID'] )) {
$langRecord = $language->findById( $langName );
if (! isset( $langRecord['LAN_ID'] )) {
if (!isset($langRecord['LAN_ID'])) {
$langRecord = $language->findById($langName);
if (!isset($langRecord['LAN_ID'])) {
//if the language doesn't exist abort
throw new Exception( 'The .po file has a invalid X-Poedit-Language definition!' );
throw new Exception('The .po file has a invalid X-Poedit-Language definition!');
}
}
@@ -172,11 +169,11 @@ class Language extends BaseLanguage
$countryName = $POHeaders['X-Poedit-Country'];
if ($countryName != '.') {
$isoCountry = new IsoCountry();
$countryRecord = $isoCountry->findByIcName( $countryName );
$countryRecord = $isoCountry->findByIcName($countryName);
if (! isset( $countryRecord['IC_UID'] )) {
if (!isset($countryRecord['IC_UID'])) {
//if the language doesn't exist abort
throw new Exception( 'The .po file has a invalid X-Poedit-Country definition!' );
throw new Exception('The .po file has a invalid X-Poedit-Country definition!');
}
$countryID = $countryRecord['IC_UID'];
@@ -186,23 +183,22 @@ class Language extends BaseLanguage
$LOCALE = $languageID;
}
$oTranslation = new Translation();
$countItems = 0;
$countItemsSuccess = 0;
$errorMsg = '';
while ($rowTranslation = $POFile->getTranslation()) {
$countItems ++;
if (! isset( $POFile->translatorComments[0] ) || ! isset( $POFile->translatorComments[1] ) || ! isset( $POFile->references[0] )) {
throw new Exception( 'The .po file doesn\'t have valid directives for Processmaker!' );
$countItems++;
if (!isset($POFile->translatorComments[0]) || !isset($POFile->translatorComments[1]) || !isset($POFile->references[0])) {
throw new Exception('The .po file doesn\'t have valid directives for Processmaker!');
}
foreach ($POFile->translatorComments as $a => $aux) {
$aux = trim( $aux );
$aux = trim($aux);
if ($aux == 'TRANSLATION') {
$identifier = $aux;
} else {
$var = explode( '/', $aux );
$var = explode('/', $aux);
if ($var[0] == 'LABEL') {
$context = $aux;
}
@@ -210,10 +206,10 @@ class Language extends BaseLanguage
$context = $aux;
}
}
if (preg_match( '/^([\w-]+)\/([\w-]+\/*[\w-]*\.xml\?)/', $aux, $match )) {
if (preg_match('/^([\w-]+)\/([\w-]+\/*[\w-]*\.xml\?)/', $aux, $match)) {
$identifier = $aux;
} else {
if (preg_match( '/^([\w-]+)\/([\w-]+\/*[\w-]*\.xml$)/', $aux, $match )) {
if (preg_match('/^([\w-]+)\/([\w-]+\/*[\w-]*\.xml$)/', $aux, $match)) {
$context = $aux;
}
}
@@ -224,10 +220,10 @@ class Language extends BaseLanguage
// it is a Sql insert on TRANSLATIONS TAble
if ($identifier == 'TRANSLATION') {
if ($updateDB) {
list ($category, $id) = explode( '/', $context );
$result = $oTranslation->addTranslation( $category, $id, $LOCALE, trim( stripcslashes( str_replace( chr( 10 ), '', $rowTranslation['msgstr'] ) ) ) );
list ($category, $id) = explode('/', $context);
$result = $translation->addTranslation($category, $id, $LOCALE, trim(stripcslashes(str_replace(chr(10), '', $rowTranslation['msgstr']))));
if ($result['codError'] == 0) {
$countItemsSuccess ++;
$countItemsSuccess++;
} else {
$errorMsg .= $id . ': ' . $result['message'] . "\n";
}
@@ -236,52 +232,52 @@ class Language extends BaseLanguage
elseif ($updateXml) {
$xmlForm = $context;
//erik: expresion to prevent and hable correctly dropdown values like -1, -2 etc.
preg_match( '/^([\w_]+)\s-\s([\w_]+)\s*-*\s*([\w\W]*)$/', $reference, $match );
preg_match('/^([\w_]+)\s-\s([\w_]+)\s*-*\s*([\w\W]*)$/', $reference, $match);
if (! file_exists( PATH_XMLFORM . $xmlForm )) {
if (!file_exists(PATH_XMLFORM . $xmlForm)) {
$errorMsg .= 'file doesn\'t exist: ' . PATH_XMLFORM . $xmlForm . "\n";
continue;
}
if (count( $match ) < 4) {
$near = isset( $rowTranslation['msgid'] ) ? $rowTranslation['msgid'] : (isset( $rowTranslation['msgstr'] ) ? $rowTranslation['msgstr'] : '');
if (count($match) < 4) {
$near = isset($rowTranslation['msgid']) ? $rowTranslation['msgid'] : (isset($rowTranslation['msgstr']) ? $rowTranslation['msgstr'] : '');
$errorMsg .= "Invalid Translation reference: \"$reference\", near -> " . strip_tags($near) . "\n";
continue;
}
$dynaform = new DynaformHandler( PATH_XMLFORM . $xmlForm );
$dynaform = new DynaformHandler(PATH_XMLFORM . $xmlForm);
$fieldName = $match[2];
$codes = explode( '-', $reference );
$codes = explode('-', $reference);
if (sizeof( $codes ) == 2) {
if (sizeof($codes) == 2) {
//is a normal node
$dynaform->addChilds( $fieldName, Array ($LOCALE => stripcslashes( str_replace( chr( 10 ), '', $rowTranslation['msgstr'] ) )
) );
} elseif (sizeof( $codes ) > 2) {
$dynaform->addChilds($fieldName, Array($LOCALE => stripcslashes(str_replace(chr(10), '', $rowTranslation['msgstr']))
));
} elseif (sizeof($codes) > 2) {
//is a node child for a language node
$name = $match[3] == "''" ? '' : $match[3];
$childNode = Array (Array ('name' => 'option','value' => $rowTranslation['msgstr'],'attributes' => Array ('name' => $name
$childNode = Array(Array('name' => 'option', 'value' => $rowTranslation['msgstr'], 'attributes' => Array('name' => $name
)
)
);
$dynaform->addChilds( $fieldName, Array ($LOCALE => null
), $childNode );
$dynaform->addChilds($fieldName, Array($LOCALE => null
), $childNode);
}
$countItemsSuccess ++;
$countItemsSuccess++;
}
}
$oLanguage = new Language();
$oLanguage->update( array ('LAN_ID' => $languageID,'LAN_ENABLED' => '1'
) );
$language = new Language();
$language->update(array('LAN_ID' => $languageID, 'LAN_ENABLED' => '1'
));
if ($updateXml) {
$trn = new Translation();
$trn->generateFileTranslation( $LOCALE );
$trn->addTranslationEnvironment( $LOCALE, $POHeaders, $countItemsSuccess );
$trn->generateFileTranslation($LOCALE);
$trn->addTranslationEnvironment($LOCALE, $POHeaders, $countItemsSuccess);
}
if ($generateMafe) {
@@ -297,26 +293,26 @@ class Language extends BaseLanguage
$results->headers = $POHeaders;
$results->errMsg = $errorMsg;
G::auditLog("UploadLanguage", "Language: ".$languageID);
G::auditLog("UploadLanguage", "Language: " . $languageID);
return $results;
} catch (Exception $oError) {
throw ($oError);
} catch (Exception $error) {
throw ($error);
}
}
//export
/**
* Export language to Download
* @throws Exception
*/
public function export ()
{
//get labels MichelangeloFE
$translation = new Translation();
try {
$oTranslation = new Translation();
$MichelangeloFE = PATH_HOME . "../workflow/public_html/lib/js";
if (file_exists($MichelangeloFE)) {
$labels = self::readLabelsDirectory($MichelangeloFE, true);
foreach ($labels as $label) {
$oTranslation->addTranslation('LABEL', 'ID_MAFE_' . G::encryptOld($label), 'en', $label);
}
//We get all MichelangeloFE and PMDynaform translatable labels.
$labels = array_merge(self::getLabelsMafe(), self::getLabelsPMDynaform());
foreach ($labels as $label) {
$translation->addTranslation('LABEL', 'ID_MAFE_' . G::encryptOld($label), 'en', $label);
}
} catch (Exception $e) {
error_log($e->getMessage());
@@ -412,8 +408,7 @@ class Language extends BaseLanguage
// IF the translations id "TRN_ID" has invalid characteres or has not accepted categories
if ($sTestResult[0] !== $trnCategory || ($trnCategory != 'LABEL' && $trnCategory != 'JAVASCRIPT')) {
$oTranslation = new Translation();
$oTranslation->remove( $aRow1['TRN_CATEGORY'], $aRow1['TRN_ID'], 'en' ); //remove not accepted translations
$translation->remove( $aRow1['TRN_CATEGORY'], $aRow1['TRN_ID'], 'en' ); //remove not accepted translations
continue; //jump to next iteration
}
@@ -561,6 +556,67 @@ class Language extends BaseLanguage
G::auditLog("ExportLanguage", "Language: ".$_GET['LOCALE']);
G::streamFile( $sPOFile, true );
}
/**
* Get Labels MAFE (Michelangelo Project)
* @return array
*/
public static function getLabelsMafe()
{
$labels = [];
$buildhash = PATH_HTML . "lib/buildhash";
if (!file_exists($buildhash)) {
throw new RuntimeException("Unable to generate labels for MAFE!.\nMissing file '{$buildhash}'.");
}
$buildhash = file_get_contents($buildhash);
$michelangeloFE = PATH_HTML . "lib/js";
$pathFileMafe = array_pop(glob($michelangeloFE . '/' . '*' . $buildhash . '*', GLOB_BRACE));
if (file_exists($pathFileMafe) && is_readable($pathFileMafe)) {
$labels = self::readLabelsDirectory($pathFileMafe, true);
}
return $labels;
}
/**
* Get Labels PMDynaform (PMDynaform Project)
* @return array
*/
public static function getLabelsPMDynaform()
{
$labels = [];
$pathFilePMDynaform = PATH_HTML . "lib/pmdynaform/build/js/PMDynaform.js";
if (file_exists($pathFilePMDynaform) && is_readable($pathFilePMDynaform)) {
$labels = self::readLabelsDirectory($pathFilePMDynaform, true);
}
return $labels;
}
/**
* We read all labels
* @param $path
* @param bool $unique
* @return array
*/
public static function readLabelsDirectory($path, $unique = false)
{
$labels = [];
if (is_file($path)) {
$info = pathinfo($path);
if (strtolower($info["extension"]) === "js") {
$file = file_get_contents($path);
//search string 'xx\'xx\'xx'.translate()
$labels = array_merge($labels, self::readLabelsFile($file, "'"));
//search string "xx\"xx\"xx".translate()
$labels = array_merge($labels, self::readLabelsFile($file, "\""));
}
}
if ($unique) {
$labels = array_unique($labels);
}
return $labels;
}
public function updateLanguagePlugin ($plugin, $idLanguage)
{
if (!file_exists(PATH_PLUGINS . $plugin)) {
@@ -835,33 +891,6 @@ class Language extends BaseLanguage
} //end foreach
}
}
public static function readLabelsDirectory($path, $unique = false)
{
$labels = array();
$items = opendir($path);
while (false !== ($item = readdir($items))) {
$a = $path . "/" . $item;
if ($item !== "." && $item !== ".." && is_dir($a)) {
$labels = array_merge($labels, self::readLabelsDirectory($a, false));
}
if (is_file($a)) {
$info = pathinfo($a);
if ($info["extension"] === "js" || $info["extension"] === "JS") {
$file = file_get_contents($a);
//search string 'xx\'xx\'xx'.translate()
$labels = array_merge($labels, self::readLabelsFile($file, "'"));
//search string "xx\"xx\"xx".translate()
$labels = array_merge($labels, self::readLabelsFile($file, "\""));
}
}
}
if ($unique) {
$labels = array_unique($labels);
}
closedir($items);
return $labels;
}
public static function readLabelsFile($file, $sep)
{

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

@@ -109,6 +109,8 @@ class PluginsRegistryMapBuilder
$tMap->addColumn('PLUGIN_REST_SERVICE', 'PluginRestService', 'string', CreoleTypes::LONGVARCHAR, false, null);
$tMap->addColumn('PLUGIN_TASK_EXTENDED_PROPERTIES', 'PluginTaskExtendedProperties', 'string', CreoleTypes::LONGVARCHAR, false, null);
$tMap->addColumn('PLUGIN_ATTRIBUTES', 'PluginAttributes', 'string', CreoleTypes::LONGVARCHAR, false, null);
} // doBuild()

View File

@@ -159,6 +159,12 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
*/
protected $plugin_rest_service;
/**
* The value for the plugin_task_extended_properties field.
* @var string
*/
protected $plugin_task_extended_properties;
/**
* The value for the plugin_attributes field.
* @var string
@@ -421,6 +427,17 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
return $this->plugin_rest_service;
}
/**
* Get the [plugin_task_extended_properties] column value.
*
* @return string
*/
public function getPluginTaskExtendedProperties()
{
return $this->plugin_task_extended_properties;
}
/**
* Get the [plugin_attributes] column value.
*
@@ -916,6 +933,28 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
} // setPluginRestService()
/**
* Set the value of [plugin_task_extended_properties] column.
*
* @param string $v new value
* @return void
*/
public function setPluginTaskExtendedProperties($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->plugin_task_extended_properties !== $v) {
$this->plugin_task_extended_properties = $v;
$this->modifiedColumns[] = PluginsRegistryPeer::PLUGIN_TASK_EXTENDED_PROPERTIES;
}
} // setPluginTaskExtendedProperties()
/**
* Set the value of [plugin_attributes] column.
*
@@ -999,14 +1038,16 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
$this->plugin_rest_service = $rs->getString($startcol + 21);
$this->plugin_attributes = $rs->getString($startcol + 22);
$this->plugin_task_extended_properties = $rs->getString($startcol + 22);
$this->plugin_attributes = $rs->getString($startcol + 23);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 23; // 23 = PluginsRegistryPeer::NUM_COLUMNS - PluginsRegistryPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 24; // 24 = PluginsRegistryPeer::NUM_COLUMNS - PluginsRegistryPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating PluginsRegistry object", $e);
@@ -1277,6 +1318,9 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
return $this->getPluginRestService();
break;
case 22:
return $this->getPluginTaskExtendedProperties();
break;
case 23:
return $this->getPluginAttributes();
break;
default:
@@ -1321,7 +1365,8 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
$keys[19] => $this->getPluginCss(),
$keys[20] => $this->getPluginJs(),
$keys[21] => $this->getPluginRestService(),
$keys[22] => $this->getPluginAttributes(),
$keys[22] => $this->getPluginTaskExtendedProperties(),
$keys[23] => $this->getPluginAttributes(),
);
return $result;
}
@@ -1420,6 +1465,9 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
$this->setPluginRestService($value);
break;
case 22:
$this->setPluginTaskExtendedProperties($value);
break;
case 23:
$this->setPluginAttributes($value);
break;
} // switch()
@@ -1534,7 +1582,11 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
}
if (array_key_exists($keys[22], $arr)) {
$this->setPluginAttributes($arr[$keys[22]]);
$this->setPluginTaskExtendedProperties($arr[$keys[22]]);
}
if (array_key_exists($keys[23], $arr)) {
$this->setPluginAttributes($arr[$keys[23]]);
}
}
@@ -1636,6 +1688,10 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
$criteria->add(PluginsRegistryPeer::PLUGIN_REST_SERVICE, $this->plugin_rest_service);
}
if ($this->isColumnModified(PluginsRegistryPeer::PLUGIN_TASK_EXTENDED_PROPERTIES)) {
$criteria->add(PluginsRegistryPeer::PLUGIN_TASK_EXTENDED_PROPERTIES, $this->plugin_task_extended_properties);
}
if ($this->isColumnModified(PluginsRegistryPeer::PLUGIN_ATTRIBUTES)) {
$criteria->add(PluginsRegistryPeer::PLUGIN_ATTRIBUTES, $this->plugin_attributes);
}
@@ -1736,6 +1792,8 @@ abstract class BasePluginsRegistry extends BaseObject implements Persistent
$copyObj->setPluginRestService($this->plugin_rest_service);
$copyObj->setPluginTaskExtendedProperties($this->plugin_task_extended_properties);
$copyObj->setPluginAttributes($this->plugin_attributes);

View File

@@ -25,7 +25,7 @@ abstract class BasePluginsRegistryPeer
const CLASS_DEFAULT = 'classes.model.PluginsRegistry';
/** The total number of columns. */
const NUM_COLUMNS = 23;
const NUM_COLUMNS = 24;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -97,6 +97,9 @@ abstract class BasePluginsRegistryPeer
/** the column name for the PLUGIN_REST_SERVICE field */
const PLUGIN_REST_SERVICE = 'PLUGINS_REGISTRY.PLUGIN_REST_SERVICE';
/** the column name for the PLUGIN_TASK_EXTENDED_PROPERTIES field */
const PLUGIN_TASK_EXTENDED_PROPERTIES = 'PLUGINS_REGISTRY.PLUGIN_TASK_EXTENDED_PROPERTIES';
/** the column name for the PLUGIN_ATTRIBUTES field */
const PLUGIN_ATTRIBUTES = 'PLUGINS_REGISTRY.PLUGIN_ATTRIBUTES';
@@ -111,10 +114,10 @@ abstract class BasePluginsRegistryPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('PrUid', 'PluginNamespace', 'PluginDescription', 'PluginClassName', 'PluginFriendlyName', 'PluginFile', 'PluginFolder', 'PluginSetupPage', 'PluginCompanyLogo', 'PluginWorkspaces', 'PluginVersion', 'PluginEnable', 'PluginPrivate', 'PluginMenus', 'PluginFolders', 'PluginTriggers', 'PluginPmFunctions', 'PluginRedirectLogin', 'PluginSteps', 'PluginCss', 'PluginJs', 'PluginRestService', 'PluginAttributes', ),
BasePeer::TYPE_COLNAME => array (PluginsRegistryPeer::PR_UID, PluginsRegistryPeer::PLUGIN_NAMESPACE, PluginsRegistryPeer::PLUGIN_DESCRIPTION, PluginsRegistryPeer::PLUGIN_CLASS_NAME, PluginsRegistryPeer::PLUGIN_FRIENDLY_NAME, PluginsRegistryPeer::PLUGIN_FILE, PluginsRegistryPeer::PLUGIN_FOLDER, PluginsRegistryPeer::PLUGIN_SETUP_PAGE, PluginsRegistryPeer::PLUGIN_COMPANY_LOGO, PluginsRegistryPeer::PLUGIN_WORKSPACES, PluginsRegistryPeer::PLUGIN_VERSION, PluginsRegistryPeer::PLUGIN_ENABLE, PluginsRegistryPeer::PLUGIN_PRIVATE, PluginsRegistryPeer::PLUGIN_MENUS, PluginsRegistryPeer::PLUGIN_FOLDERS, PluginsRegistryPeer::PLUGIN_TRIGGERS, PluginsRegistryPeer::PLUGIN_PM_FUNCTIONS, PluginsRegistryPeer::PLUGIN_REDIRECT_LOGIN, PluginsRegistryPeer::PLUGIN_STEPS, PluginsRegistryPeer::PLUGIN_CSS, PluginsRegistryPeer::PLUGIN_JS, PluginsRegistryPeer::PLUGIN_REST_SERVICE, PluginsRegistryPeer::PLUGIN_ATTRIBUTES, ),
BasePeer::TYPE_FIELDNAME => array ('PR_UID', 'PLUGIN_NAMESPACE', 'PLUGIN_DESCRIPTION', 'PLUGIN_CLASS_NAME', 'PLUGIN_FRIENDLY_NAME', 'PLUGIN_FILE', 'PLUGIN_FOLDER', 'PLUGIN_SETUP_PAGE', 'PLUGIN_COMPANY_LOGO', 'PLUGIN_WORKSPACES', 'PLUGIN_VERSION', 'PLUGIN_ENABLE', 'PLUGIN_PRIVATE', 'PLUGIN_MENUS', 'PLUGIN_FOLDERS', 'PLUGIN_TRIGGERS', 'PLUGIN_PM_FUNCTIONS', 'PLUGIN_REDIRECT_LOGIN', 'PLUGIN_STEPS', 'PLUGIN_CSS', 'PLUGIN_JS', 'PLUGIN_REST_SERVICE', 'PLUGIN_ATTRIBUTES', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, )
BasePeer::TYPE_PHPNAME => array ('PrUid', 'PluginNamespace', 'PluginDescription', 'PluginClassName', 'PluginFriendlyName', 'PluginFile', 'PluginFolder', 'PluginSetupPage', 'PluginCompanyLogo', 'PluginWorkspaces', 'PluginVersion', 'PluginEnable', 'PluginPrivate', 'PluginMenus', 'PluginFolders', 'PluginTriggers', 'PluginPmFunctions', 'PluginRedirectLogin', 'PluginSteps', 'PluginCss', 'PluginJs', 'PluginRestService', 'PluginTaskExtendedProperties', 'PluginAttributes', ),
BasePeer::TYPE_COLNAME => array (PluginsRegistryPeer::PR_UID, PluginsRegistryPeer::PLUGIN_NAMESPACE, PluginsRegistryPeer::PLUGIN_DESCRIPTION, PluginsRegistryPeer::PLUGIN_CLASS_NAME, PluginsRegistryPeer::PLUGIN_FRIENDLY_NAME, PluginsRegistryPeer::PLUGIN_FILE, PluginsRegistryPeer::PLUGIN_FOLDER, PluginsRegistryPeer::PLUGIN_SETUP_PAGE, PluginsRegistryPeer::PLUGIN_COMPANY_LOGO, PluginsRegistryPeer::PLUGIN_WORKSPACES, PluginsRegistryPeer::PLUGIN_VERSION, PluginsRegistryPeer::PLUGIN_ENABLE, PluginsRegistryPeer::PLUGIN_PRIVATE, PluginsRegistryPeer::PLUGIN_MENUS, PluginsRegistryPeer::PLUGIN_FOLDERS, PluginsRegistryPeer::PLUGIN_TRIGGERS, PluginsRegistryPeer::PLUGIN_PM_FUNCTIONS, PluginsRegistryPeer::PLUGIN_REDIRECT_LOGIN, PluginsRegistryPeer::PLUGIN_STEPS, PluginsRegistryPeer::PLUGIN_CSS, PluginsRegistryPeer::PLUGIN_JS, PluginsRegistryPeer::PLUGIN_REST_SERVICE, PluginsRegistryPeer::PLUGIN_TASK_EXTENDED_PROPERTIES, PluginsRegistryPeer::PLUGIN_ATTRIBUTES, ),
BasePeer::TYPE_FIELDNAME => array ('PR_UID', 'PLUGIN_NAMESPACE', 'PLUGIN_DESCRIPTION', 'PLUGIN_CLASS_NAME', 'PLUGIN_FRIENDLY_NAME', 'PLUGIN_FILE', 'PLUGIN_FOLDER', 'PLUGIN_SETUP_PAGE', 'PLUGIN_COMPANY_LOGO', 'PLUGIN_WORKSPACES', 'PLUGIN_VERSION', 'PLUGIN_ENABLE', 'PLUGIN_PRIVATE', 'PLUGIN_MENUS', 'PLUGIN_FOLDERS', 'PLUGIN_TRIGGERS', 'PLUGIN_PM_FUNCTIONS', 'PLUGIN_REDIRECT_LOGIN', 'PLUGIN_STEPS', 'PLUGIN_CSS', 'PLUGIN_JS', 'PLUGIN_REST_SERVICE', 'PLUGIN_TASK_EXTENDED_PROPERTIES', 'PLUGIN_ATTRIBUTES', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, )
);
/**
@@ -124,10 +127,10 @@ abstract class BasePluginsRegistryPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('PrUid' => 0, 'PluginNamespace' => 1, 'PluginDescription' => 2, 'PluginClassName' => 3, 'PluginFriendlyName' => 4, 'PluginFile' => 5, 'PluginFolder' => 6, 'PluginSetupPage' => 7, 'PluginCompanyLogo' => 8, 'PluginWorkspaces' => 9, 'PluginVersion' => 10, 'PluginEnable' => 11, 'PluginPrivate' => 12, 'PluginMenus' => 13, 'PluginFolders' => 14, 'PluginTriggers' => 15, 'PluginPmFunctions' => 16, 'PluginRedirectLogin' => 17, 'PluginSteps' => 18, 'PluginCss' => 19, 'PluginJs' => 20, 'PluginRestService' => 21, 'PluginAttributes' => 22, ),
BasePeer::TYPE_COLNAME => array (PluginsRegistryPeer::PR_UID => 0, PluginsRegistryPeer::PLUGIN_NAMESPACE => 1, PluginsRegistryPeer::PLUGIN_DESCRIPTION => 2, PluginsRegistryPeer::PLUGIN_CLASS_NAME => 3, PluginsRegistryPeer::PLUGIN_FRIENDLY_NAME => 4, PluginsRegistryPeer::PLUGIN_FILE => 5, PluginsRegistryPeer::PLUGIN_FOLDER => 6, PluginsRegistryPeer::PLUGIN_SETUP_PAGE => 7, PluginsRegistryPeer::PLUGIN_COMPANY_LOGO => 8, PluginsRegistryPeer::PLUGIN_WORKSPACES => 9, PluginsRegistryPeer::PLUGIN_VERSION => 10, PluginsRegistryPeer::PLUGIN_ENABLE => 11, PluginsRegistryPeer::PLUGIN_PRIVATE => 12, PluginsRegistryPeer::PLUGIN_MENUS => 13, PluginsRegistryPeer::PLUGIN_FOLDERS => 14, PluginsRegistryPeer::PLUGIN_TRIGGERS => 15, PluginsRegistryPeer::PLUGIN_PM_FUNCTIONS => 16, PluginsRegistryPeer::PLUGIN_REDIRECT_LOGIN => 17, PluginsRegistryPeer::PLUGIN_STEPS => 18, PluginsRegistryPeer::PLUGIN_CSS => 19, PluginsRegistryPeer::PLUGIN_JS => 20, PluginsRegistryPeer::PLUGIN_REST_SERVICE => 21, PluginsRegistryPeer::PLUGIN_ATTRIBUTES => 22, ),
BasePeer::TYPE_FIELDNAME => array ('PR_UID' => 0, 'PLUGIN_NAMESPACE' => 1, 'PLUGIN_DESCRIPTION' => 2, 'PLUGIN_CLASS_NAME' => 3, 'PLUGIN_FRIENDLY_NAME' => 4, 'PLUGIN_FILE' => 5, 'PLUGIN_FOLDER' => 6, 'PLUGIN_SETUP_PAGE' => 7, 'PLUGIN_COMPANY_LOGO' => 8, 'PLUGIN_WORKSPACES' => 9, 'PLUGIN_VERSION' => 10, 'PLUGIN_ENABLE' => 11, 'PLUGIN_PRIVATE' => 12, 'PLUGIN_MENUS' => 13, 'PLUGIN_FOLDERS' => 14, 'PLUGIN_TRIGGERS' => 15, 'PLUGIN_PM_FUNCTIONS' => 16, 'PLUGIN_REDIRECT_LOGIN' => 17, 'PLUGIN_STEPS' => 18, 'PLUGIN_CSS' => 19, 'PLUGIN_JS' => 20, 'PLUGIN_REST_SERVICE' => 21, 'PLUGIN_ATTRIBUTES' => 22, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, )
BasePeer::TYPE_PHPNAME => array ('PrUid' => 0, 'PluginNamespace' => 1, 'PluginDescription' => 2, 'PluginClassName' => 3, 'PluginFriendlyName' => 4, 'PluginFile' => 5, 'PluginFolder' => 6, 'PluginSetupPage' => 7, 'PluginCompanyLogo' => 8, 'PluginWorkspaces' => 9, 'PluginVersion' => 10, 'PluginEnable' => 11, 'PluginPrivate' => 12, 'PluginMenus' => 13, 'PluginFolders' => 14, 'PluginTriggers' => 15, 'PluginPmFunctions' => 16, 'PluginRedirectLogin' => 17, 'PluginSteps' => 18, 'PluginCss' => 19, 'PluginJs' => 20, 'PluginRestService' => 21, 'PluginTaskExtendedProperties' => 22, 'PluginAttributes' => 23, ),
BasePeer::TYPE_COLNAME => array (PluginsRegistryPeer::PR_UID => 0, PluginsRegistryPeer::PLUGIN_NAMESPACE => 1, PluginsRegistryPeer::PLUGIN_DESCRIPTION => 2, PluginsRegistryPeer::PLUGIN_CLASS_NAME => 3, PluginsRegistryPeer::PLUGIN_FRIENDLY_NAME => 4, PluginsRegistryPeer::PLUGIN_FILE => 5, PluginsRegistryPeer::PLUGIN_FOLDER => 6, PluginsRegistryPeer::PLUGIN_SETUP_PAGE => 7, PluginsRegistryPeer::PLUGIN_COMPANY_LOGO => 8, PluginsRegistryPeer::PLUGIN_WORKSPACES => 9, PluginsRegistryPeer::PLUGIN_VERSION => 10, PluginsRegistryPeer::PLUGIN_ENABLE => 11, PluginsRegistryPeer::PLUGIN_PRIVATE => 12, PluginsRegistryPeer::PLUGIN_MENUS => 13, PluginsRegistryPeer::PLUGIN_FOLDERS => 14, PluginsRegistryPeer::PLUGIN_TRIGGERS => 15, PluginsRegistryPeer::PLUGIN_PM_FUNCTIONS => 16, PluginsRegistryPeer::PLUGIN_REDIRECT_LOGIN => 17, PluginsRegistryPeer::PLUGIN_STEPS => 18, PluginsRegistryPeer::PLUGIN_CSS => 19, PluginsRegistryPeer::PLUGIN_JS => 20, PluginsRegistryPeer::PLUGIN_REST_SERVICE => 21, PluginsRegistryPeer::PLUGIN_TASK_EXTENDED_PROPERTIES => 22, PluginsRegistryPeer::PLUGIN_ATTRIBUTES => 23, ),
BasePeer::TYPE_FIELDNAME => array ('PR_UID' => 0, 'PLUGIN_NAMESPACE' => 1, 'PLUGIN_DESCRIPTION' => 2, 'PLUGIN_CLASS_NAME' => 3, 'PLUGIN_FRIENDLY_NAME' => 4, 'PLUGIN_FILE' => 5, 'PLUGIN_FOLDER' => 6, 'PLUGIN_SETUP_PAGE' => 7, 'PLUGIN_COMPANY_LOGO' => 8, 'PLUGIN_WORKSPACES' => 9, 'PLUGIN_VERSION' => 10, 'PLUGIN_ENABLE' => 11, 'PLUGIN_PRIVATE' => 12, 'PLUGIN_MENUS' => 13, 'PLUGIN_FOLDERS' => 14, 'PLUGIN_TRIGGERS' => 15, 'PLUGIN_PM_FUNCTIONS' => 16, 'PLUGIN_REDIRECT_LOGIN' => 17, 'PLUGIN_STEPS' => 18, 'PLUGIN_CSS' => 19, 'PLUGIN_JS' => 20, 'PLUGIN_REST_SERVICE' => 21, 'PLUGIN_TASK_EXTENDED_PROPERTIES' => 22, 'PLUGIN_ATTRIBUTES' => 23, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, )
);
/**
@@ -272,6 +275,8 @@ abstract class BasePluginsRegistryPeer
$criteria->addSelectColumn(PluginsRegistryPeer::PLUGIN_REST_SERVICE);
$criteria->addSelectColumn(PluginsRegistryPeer::PLUGIN_TASK_EXTENDED_PROPERTIES);
$criteria->addSelectColumn(PluginsRegistryPeer::PLUGIN_ATTRIBUTES);
}

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