Merge pull request #2145 from gproly/BUG-13324
BUG-13324 SOLVED Al actualizar la versión de ProcessMaker v2.0.45 a Proc...
This commit is contained in:
@@ -315,26 +315,16 @@ class Configurations // extends Configuration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function userNameFormat($username, $fullname)
|
public function userNameFormat($username, $fullname, $usrUid = '')
|
||||||
{
|
{
|
||||||
|
$aux = '';
|
||||||
try {
|
if ($usrUid != '') {
|
||||||
if (!isset($this->UserConfig)) {
|
$oUser = UsersPeer::retrieveByPK($usrUid);
|
||||||
$this->UserConfig = $this->getConfiguration('ENVIRONMENT_SETTINGS', '');
|
$aux = str_replace('@userName', trim($username), $this->UserConfig['format']);
|
||||||
}
|
$aux = str_replace('@firstName', $oUser->getUsrFirstname(), $aux);
|
||||||
if (isset($this->UserConfig['format'])) {
|
$aux = str_replace('@lastName', $oUser->getUsrLastname(), $aux);
|
||||||
$name = explode(' ',$fullname);
|
|
||||||
$aux = '';
|
|
||||||
$aux = str_replace('@userName', trim($username), $this->UserConfig['format']);
|
|
||||||
$aux = str_replace('@firstName', isset($name[0])?$name[0]:'', $aux);
|
|
||||||
$aux = str_replace('@lastName', isset($name[1])?$name[1]:'', $aux);
|
|
||||||
return $aux;
|
|
||||||
} else {
|
|
||||||
return $username;
|
|
||||||
}
|
|
||||||
} catch (Exception $oError) {
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
return $aux;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function usersNameFormatBySetParameters($formatUserName, $userName, $firstName, $lastName)
|
public function usersNameFormatBySetParameters($formatUserName, $userName, $firstName, $lastName)
|
||||||
@@ -548,7 +538,8 @@ class Configurations // extends Configuration
|
|||||||
public function getSystemDate($dateTime)
|
public function getSystemDate($dateTime)
|
||||||
{
|
{
|
||||||
$oConf = new Configurations();
|
$oConf = new Configurations();
|
||||||
$dateFormat = 'M d, Y';
|
$oConf->getFormats();
|
||||||
|
$dateFormat = $oConf->UserConfig['dateFormat'];
|
||||||
$oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', '');
|
$oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', '');
|
||||||
$creationDateMask = isset($oConf->aConfig['dateFormat']) ? $oConf->aConfig['dateFormat'] : '';
|
$creationDateMask = isset($oConf->aConfig['dateFormat']) ? $oConf->aConfig['dateFormat'] : '';
|
||||||
$creationDateMask = ($creationDateMask == '') ? $dateFormat : $creationDateMask;
|
$creationDateMask = ($creationDateMask == '') ? $dateFormat : $creationDateMask;
|
||||||
|
|||||||
@@ -420,12 +420,13 @@ class SkinEngine
|
|||||||
|
|
||||||
G::LoadClass( "configuration" );
|
G::LoadClass( "configuration" );
|
||||||
$conf = new Configurations();
|
$conf = new Configurations();
|
||||||
if (defined('SYS_SYS') && $conf->exists("ENVIRONMENT_SETTINGS")) {
|
$conf->getFormats();
|
||||||
|
if (defined('SYS_SYS')) {
|
||||||
$smarty->assign('udate', $conf->getSystemDate(date('Y-m-d H:i:s')));
|
$smarty->assign('udate', $conf->getSystemDate(date('Y-m-d H:i:s')));
|
||||||
} else {
|
} else {
|
||||||
$smarty->assign('udate', G::getformatedDate(date('Y-m-d'), 'M d, yyyy', SYS_LANG));
|
$smarty->assign('udate', G::getformatedDate(date('Y-m-d'), 'M d, yyyy', SYS_LANG));
|
||||||
}
|
}
|
||||||
$name = $conf->userNameFormat(isset($_SESSION['USR_USERNAME']) ? $_SESSION['USR_USERNAME']: '', isset($_SESSION['USR_FULLNAME']) ? htmlentities($_SESSION['USR_FULLNAME'] , ENT_QUOTES, 'UTF-8'): '');
|
$name = $conf->userNameFormat(isset($_SESSION['USR_USERNAME']) ? $_SESSION['USR_USERNAME']: '', isset($_SESSION['USR_FULLNAME']) ? htmlentities($_SESSION['USR_FULLNAME'] , ENT_QUOTES, 'UTF-8'): '', isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '');
|
||||||
$smarty->assign('user',$name);
|
$smarty->assign('user',$name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -725,12 +726,13 @@ class SkinEngine
|
|||||||
|
|
||||||
G::LoadClass( "configuration" );
|
G::LoadClass( "configuration" );
|
||||||
$conf = new Configurations();
|
$conf = new Configurations();
|
||||||
if ( defined('SYS_SYS') && $conf->exists("ENVIRONMENT_SETTINGS")) {
|
$conf->getFormats();
|
||||||
|
if ( defined('SYS_SYS')) {
|
||||||
$smarty->assign('udate', $conf->getSystemDate(date('Y-m-d H:i:s')));
|
$smarty->assign('udate', $conf->getSystemDate(date('Y-m-d H:i:s')));
|
||||||
} else {
|
} else {
|
||||||
$smarty->assign('udate', G::getformatedDate(date('Y-m-d H:i:s'), 'M d, yyyy', SYS_LANG));
|
$smarty->assign('udate', G::getformatedDate(date('Y-m-d H:i:s'), 'M d, yyyy', SYS_LANG));
|
||||||
}
|
}
|
||||||
$name = $conf->userNameFormat(isset($_SESSION['USR_USERNAME']) ? $_SESSION['USR_USERNAME']: '', isset($_SESSION['USR_FULLNAME']) ? htmlentities($_SESSION['USR_FULLNAME'] , ENT_QUOTES, 'UTF-8'): '');
|
$name = $conf->userNameFormat(isset($_SESSION['USR_USERNAME']) ? $_SESSION['USR_USERNAME']: '', isset($_SESSION['USR_FULLNAME']) ? htmlentities($_SESSION['USR_FULLNAME'] , ENT_QUOTES, 'UTF-8'): '', isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '');
|
||||||
$smarty->assign('user',$name);
|
$smarty->assign('user',$name);
|
||||||
}
|
}
|
||||||
if(class_exists('pmLicenseManager')){
|
if(class_exists('pmLicenseManager')){
|
||||||
|
|||||||
Reference in New Issue
Block a user