diff --git a/workflow/engine/classes/class.configuration.php b/workflow/engine/classes/class.configuration.php index 0b625504b..21e62447e 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,28 @@ 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]]; + } + } + + $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))); } } diff --git a/workflow/engine/classes/class.wsTools.php b/workflow/engine/classes/class.wsTools.php index 71bfd8e22..21f47f6b0 100755 --- a/workflow/engine/classes/class.wsTools.php +++ b/workflow/engine/classes/class.wsTools.php @@ -302,15 +302,12 @@ class workspaceTools $names = explode(".", basename($poFile)); $extension = array_pop($names); $langid = array_pop($names); - if (strcasecmp($langid, "en") == 0) { - CLI::logging("Updating database translations with $poName\n"); - Language::import($poFile, false, true); - } elseif ($first) { + if (strcasecmp($langid, "en") != 0 && $first) { CLI::logging("Updating XML form translations with $poName\n"); Language::import($poFile, true, false); - CLI::logging("Updating database translations with $poName\n"); - Language::import($poFile, false, true); } + CLI::logging("Updating database translations with $poName\n"); + Language::import($poFile, false, true); } } diff --git a/workflow/engine/classes/model/Language.php b/workflow/engine/classes/model/Language.php index c417fb63a..3c5a8f047 100755 --- a/workflow/engine/classes/model/Language.php +++ b/workflow/engine/classes/model/Language.php @@ -275,9 +275,11 @@ class Language extends BaseLanguage $oLanguage->update( array ('LAN_ID' => $languageID,'LAN_ENABLED' => '1' ) ); - $trn = new Translation(); - $trn->generateFileTranslation( $LOCALE ); - $trn->addTranslationEnvironment( $LOCALE, $POHeaders, $countItemsSuccess ); + if ($updateXml) { + $trn = new Translation(); + $trn->generateFileTranslation( $LOCALE ); + $trn->addTranslationEnvironment( $LOCALE, $POHeaders, $countItemsSuccess ); + } //fill the results $results = new stdClass(); diff --git a/workflow/engine/methods/appFolder/appFolderAjax.php b/workflow/engine/methods/appFolder/appFolderAjax.php index 8d993a505..8d71ad3f4 100755 --- a/workflow/engine/methods/appFolder/appFolderAjax.php +++ b/workflow/engine/methods/appFolder/appFolderAjax.php @@ -941,6 +941,7 @@ function copyMoveAction($type) $itemField["triggerAction"] = "all"; $itemField["store"] = $folderResult; $itemField["valueField"] = "FOLDER_UID"; + $itemField["editable"] = false; $itemField["displayField"] = "FOLDER_NAME"; $itemField["selectOnFocus"] = true; $itemField["tpl"] = '
{field2}
'; 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' ); diff --git a/workflow/engine/methods/setup/languages_Import.php b/workflow/engine/methods/setup/languages_Import.php index c50ba9b0c..6fa83802e 100755 --- a/workflow/engine/methods/setup/languages_Import.php +++ b/workflow/engine/methods/setup/languages_Import.php @@ -97,6 +97,12 @@ try { ); $configuration->saveConfig( 'LANGUAGE_META', $importResults->lang ); + $dir = PATH_CORE . 'content' . PATH_SEP . 'translations' . PATH_SEP; + if (! is_writable( $dir )) { + throw new Exception( G::LoadTranslation( 'ID_TRANSLATIONS_FOLDER_PERMISSIONS' ) ); + } + G::uploadFile($languageFile, $dir, $languageFilename, 0777); + ini_set( 'max_execution_time', $sMaxExecutionTime ); } catch (Exception $oError) { diff --git a/workflow/engine/templates/users/users.js b/workflow/engine/templates/users/users.js index 763f2eaa2..d3e8862f6 100644 --- a/workflow/engine/templates/users/users.js +++ b/workflow/engine/templates/users/users.js @@ -421,6 +421,7 @@ Ext.onReady(function () { xtype : 'textfield', width : 260, allowBlank : false, + hidden : (typeof EDITPROFILE != "undefined" && EDITPROFILE == 1)? true : false, listeners: { blur : function(ob) {