release/3.2.2 to develop conflicts

This commit is contained in:
Paula Quispe
2017-10-23 11:37:41 -04:00
185 changed files with 2479 additions and 2209 deletions

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

@@ -83,7 +83,7 @@ class AppNotes extends BaseAppNotes
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$aRow['NOTE_CONTENT'] = htmlentities(stripslashes($aRow['NOTE_CONTENT']), ENT_QUOTES, 'UTF-8');
$aRow['NOTE_CONTENT'] = stripslashes($aRow['NOTE_CONTENT']);
$response['notes'][] = $aRow;
$oDataset->next();
}
@@ -240,5 +240,21 @@ class AppNotes extends BaseAppNotes
return $response;
}
/**
* Add htmlEntities to notes in node_content
* @param $notes
* @return array
*/
public static function applyHtmlentitiesInNotes($notes)
{
if (isset($notes) && isset($notes["array"])) {
foreach ($notes["array"]["notes"] as &$note) {
$note["NOTE_CONTENT"] = htmlentities($note["NOTE_CONTENT"], ENT_QUOTES, 'UTF-8');
}
}
return $notes;
}
}

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

@@ -645,10 +645,9 @@ class ListInbox extends BaseListInbox
$filters['usr_uid'] = $usrUid;
$criteria = new Criteria();
$criteria->addSelectColumn('COUNT(*) AS TOTAL');
$criteria->add(ListInboxPeer::USR_UID, $usrUid, Criteria::EQUAL);
if (count($filters)) {
self::loadFilters($criteria, $filters);
}
//The function loadFilters will add some condition in the query
$this->loadFilters($criteria, $filters);
$dataset = ListInboxPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();

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 = '';