From 736c693d0f3e1e965eab2a08103dbff6eef74d39 Mon Sep 17 00:00:00 2001 From: ralph Date: Thu, 4 Apr 2013 16:38:53 -0400 Subject: [PATCH 1/2] Setting header date according Configuration. --- workflow/engine/skinEngine/skinEngine.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/workflow/engine/skinEngine/skinEngine.php b/workflow/engine/skinEngine/skinEngine.php index cf49a6740..8595df47f 100755 --- a/workflow/engine/skinEngine/skinEngine.php +++ b/workflow/engine/skinEngine/skinEngine.php @@ -390,8 +390,10 @@ class SkinEngine $smarty->assign('workspace', defined('SYS_SYS')?SYS_SYS: ''); $uws = (isset($_SESSION['USR_ROLENAME']) && $_SESSION['USR_ROLENAME'] != '')? strtolower(G::LoadTranslation('ID_WORKSPACE_USING')): G::LoadTranslation('ID_WORKSPACE_USING'); $smarty->assign('workspace_label', $uws); - $smarty->assign('udate', G::getformatedDate(date('Y-m-d'), 'M d, yyyy', SYS_LANG)); - + + G::LoadClass( "configuration" ); + $conf = new Configurations(); + $smarty->assign('udate', $conf->getSystemDate(date('Y-m-d')));//G::getformatedDate(date('Y-m-d'), $currentFormat, SYS_LANG)); } if (defined('SYS_SYS')) { @@ -642,7 +644,10 @@ class SkinEngine $smarty->assign('workspace', defined('SYS_SYS')?SYS_SYS: ''); $uws = (isset($_SESSION['USR_ROLENAME']) && $_SESSION['USR_ROLENAME'] != '')? strtolower(G::LoadTranslation('ID_WORKSPACE_USING')): G::LoadTranslation('ID_WORKSPACE_USING'); $smarty->assign('workspace_label', $uws); - $smarty->assign('udate', G::getformatedDate(date('Y-m-d'), 'M d, yyyy', SYS_LANG)); + + G::LoadClass( "configuration" ); + $conf = new Configurations(); + $smarty->assign('udate', $conf->getSystemDate(date('Y-m-d')));//G::getformatedDate(date('Y-m-d'), $currentFormat, SYS_LANG)); } if(class_exists('pmLicenseManager')){ From 3a26f1c262745fad3aa355220c8d5ae994862e27 Mon Sep 17 00:00:00 2001 From: ralph Date: Thu, 4 Apr 2013 17:34:14 -0400 Subject: [PATCH 2/2] Adding conditions to check enviroment configuration dateformat. --- workflow/engine/classes/class.configuration.php | 5 +++++ workflow/engine/skinEngine/skinEngine.php | 14 +++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/workflow/engine/classes/class.configuration.php b/workflow/engine/classes/class.configuration.php index aa9dfd7c2..012c91932 100755 --- a/workflow/engine/classes/class.configuration.php +++ b/workflow/engine/classes/class.configuration.php @@ -88,6 +88,11 @@ class Configurations // extends Configuration } } } + + public function exists($cfgID) + { + return $this->Configuration->exists($cfgID,"",'','',''); + } /** * configObject diff --git a/workflow/engine/skinEngine/skinEngine.php b/workflow/engine/skinEngine/skinEngine.php index 8595df47f..9e3d81a87 100755 --- a/workflow/engine/skinEngine/skinEngine.php +++ b/workflow/engine/skinEngine/skinEngine.php @@ -393,7 +393,11 @@ class SkinEngine G::LoadClass( "configuration" ); $conf = new Configurations(); - $smarty->assign('udate', $conf->getSystemDate(date('Y-m-d')));//G::getformatedDate(date('Y-m-d'), $currentFormat, SYS_LANG)); + if (defined('SYS_SYS') && $conf->exists("ENVIRONMENT_SETTINGS")) { + $smarty->assign('udate', $conf->getSystemDate(date('Y-m-d'))); + } else { + $smarty->assign('udate', G::getformatedDate(date('Y-m-d'), 'M d, yyyy', SYS_LANG)); + } } if (defined('SYS_SYS')) { @@ -647,8 +651,12 @@ class SkinEngine G::LoadClass( "configuration" ); $conf = new Configurations(); - $smarty->assign('udate', $conf->getSystemDate(date('Y-m-d')));//G::getformatedDate(date('Y-m-d'), $currentFormat, SYS_LANG)); - + if ( defined('SYS_SYS') && $conf->exists("ENVIRONMENT_SETTINGS")) { + $smarty->assign('udate', $conf->getSystemDate(date('Y-m-d'))); + } else { + $smarty->assign('udate', G::getformatedDate(date('Y-m-d'), 'M d, yyyy', SYS_LANG)); + } + } if(class_exists('pmLicenseManager')){ $pmLicenseManagerO = &pmLicenseManager::getSingleton();