From fe6b43065726241d2932c330d94ac213fe8d16f9 Mon Sep 17 00:00:00 2001 From: Brayan Osmar Pereyra Suxo Date: Wed, 17 Apr 2013 18:10:21 -0400 Subject: [PATCH 1/3] DOC SYSTEM Arreglo en formato de fecha en configuration Arreglo en formato de fecha en configuration --- .../engine/classes/class.configuration.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/workflow/engine/classes/class.configuration.php b/workflow/engine/classes/class.configuration.php index 0b625504b..9e05f1bb6 100755 --- a/workflow/engine/classes/class.configuration.php +++ b/workflow/engine/classes/class.configuration.php @@ -508,7 +508,6 @@ class Configurations // extends Configuration $oConf = new Configurations(); $oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', ''); $creationDateMask = isset($oConf->aConfig['dateFormat']) ? $oConf->aConfig['dateFormat'] : ''; - if ($creationDateMask != '') { if (strpos($dateTime, ' ') !== false) { list ($date, $time) = explode(' ', $dateTime); @@ -517,7 +516,23 @@ class Configurations // extends Configuration $dateTime = date($creationDateMask, mktime($h, $i, $s, $m, $d, $y)); } else { list ($y, $m, $d) = explode('-', $dateTime); - $dateTime = date($creationDateMask, mktime(0, 0, 0, $m, $d, $y)); + $newCreation = ''; + $maskTime = array('d' => '%d', 'D' => '%a', 'j' => '%e', 'l' => '%A', 'N' => '%u', 'S' => '%d', 'w' => '%w', 'z' => '%j', 'W' => '%W', 'F' => '%B', 'm' => '%m', 'M' => '%h', 'n' => '%m', 'o' => '%Y', 'Y' => '%Y', 'y' => '%g', 'a' => '%P', 'A' => '%p', 'g' => '%l', 'G' => '%k', 'h' => '%I', 'H' => '%H', 'i' => '%M', 's' => '%S'); + $creationDateMask = trim($creationDateMask); + for ($i = 0; $i < strlen($creationDateMask); $i++) { + if ($creationDateMask[$i] == ' ' || $creationDateMask[$i] == ',') { + $newCreation .= $creationDateMask[$i]; + } else { + $newCreation .= $maskTime[$creationDateMask[$i]]; + } + } + if (substr(SYS_LANG,0,2) == 'pt') { + setlocale(LC_TIME,"pt_BR"); + } else if (substr(SYS_LANG,0,2) == 'es') { + setlocale(LC_TIME,"es_ES"); + } + + $dateTime = utf8_encode(strftime($newCreation, mktime(0, 0, 0, $m, $d, $y))); } } From 9929dc3c14d39bf412fa4f8071cc6229c5362af3 Mon Sep 17 00:00:00 2001 From: Brayan Osmar Pereyra Suxo Date: Thu, 18 Apr 2013 09:27:40 -0400 Subject: [PATCH 2/3] DOC SYSTEM Arreglo de lenguaje en la clase Configurations Arreglo de lenguaje en la clase Configurations --- workflow/engine/classes/class.configuration.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/workflow/engine/classes/class.configuration.php b/workflow/engine/classes/class.configuration.php index 9e05f1bb6..21e62447e 100755 --- a/workflow/engine/classes/class.configuration.php +++ b/workflow/engine/classes/class.configuration.php @@ -526,12 +526,17 @@ class Configurations // extends Configuration $newCreation .= $maskTime[$creationDateMask[$i]]; } } - if (substr(SYS_LANG,0,2) == 'pt') { - setlocale(LC_TIME,"pt_BR"); - } else if (substr(SYS_LANG,0,2) == 'es') { - setlocale(LC_TIME,"es_ES"); + + $langLocate = SYS_LANG; + if (SYS_LANG == 'es') { + $langLocate = 'es_ES'; + } else if (strlen(SYS_LANG) > 2) { + $langLocate = str_replace('-', '_', SYS_LANG); + } else { + $langLocate = 'en_US'; } + setlocale(LC_TIME, $langLocate); $dateTime = utf8_encode(strftime($newCreation, mktime(0, 0, 0, $m, $d, $y))); } } From a2c6ee4bd976f55b4f2e7c59d5e4a8a55a29a92a Mon Sep 17 00:00:00 2001 From: Marco Antonio Nina Date: Thu, 18 Apr 2013 09:51:22 -0400 Subject: [PATCH 3/3] BUG-9675: Advanced LDAP Sync Plugin 1.4.27 Error al editar... IMPROVEMENT - option import Users enter without having activated the plugin. - was add validation for option import users. --- .../authSources/authSources_SearchUsers.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/workflow/engine/methods/authSources/authSources_SearchUsers.php b/workflow/engine/methods/authSources/authSources_SearchUsers.php index da4c9d653..a5956290e 100755 --- a/workflow/engine/methods/authSources/authSources_SearchUsers.php +++ b/workflow/engine/methods/authSources/authSources_SearchUsers.php @@ -34,6 +34,25 @@ $G_ID_MENU_SELECTED = 'USERS'; $G_ID_SUB_MENU_SELECTED = 'AUTH_SOURCES'; $G_PUBLISH = new Publisher(); +$fields = $RBAC->getAuthSource( $_GET['sUID'] ); +if (file_exists( PATH_PLUGINS . $fields['AUTH_SOURCE_PROVIDER'] . PATH_SEP . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml' )) { + $pluginEnabled = 0; + + if (file_exists(PATH_PLUGINS . $fields["AUTH_SOURCE_PROVIDER"] . ".php")) { + $pluginRegistry = &PMPluginRegistry::getSingleton(); + $pluginDetail = $pluginRegistry->getPluginDetails($fields["AUTH_SOURCE_PROVIDER"] . ".php"); + + if ($pluginDetail && $pluginDetail->enabled) { + $pluginEnabled = 1; + } + } + + if ($pluginEnabled == 0) { + $G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', array ('MESSAGE' => G::LoadTranslation( 'ID_AUTH_SOURCE_MISSING' ) ) ); + G::RenderPage( 'publish', 'blank' ); + } +} + $G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'authSources/authSources_SearchUsers', '', array ('AUTH_SOURCE_UID' => $_GET['sUID']), '../authSources/authSources_ImportUsers' ); G::RenderPage( 'publish', 'blank' );