[2010-12-08 21:22:03] Rev:657 | 2 files Modified

erik: fixed a problem exporting a language with de options in dropdowns acheckgroup
--------------------------------------------------------------------------------
1. M /trunk/workflow/engine/methods/setup/languages_Export.php
2. M /trunk/workflow/engine/classes/class.languages.php
This commit is contained in:
Erik Amaru Ortiz
2010-12-09 14:13:58 +00:00
parent 67d40a4ebd
commit 7c20fc2962
2 changed files with 11 additions and 7 deletions

View File

@@ -299,7 +299,10 @@ class languages {
$countItemsSuccess++;
} else if( $updateXml ){
$xmlForm = $context;
$codes = explode(' - ', $reference);
$codes = explode('-', $reference);
foreach($codes as $i=>$code){
$codes[$i] = trim($code);
}
$fieldName = trim($codes[1]);
if( ! file_exists(PATH_XMLFORM . $xmlForm) ) {

View File

@@ -224,12 +224,12 @@ foreach ($aXMLForms as $xmlFormPath) {
$aMsgids[$msgid] = true;
//if it is a dropdown field
if( $arrayNode['type'] == 'dropdown' && isset($arrayNode[$_BASE_LANG]) && isset($arrayNode[$_BASE_LANG][0]) && isset($arrayNode[$_BASE_LANG][0]['option']) ){
if( isset($arrayNode[$_BASE_LANG]) && isset($arrayNode[$_BASE_LANG][0]) && isset($arrayNode[$_BASE_LANG][0]['option']) ){
$originOptionNode = $arrayNode[$_BASE_LANG][0]['option']; //get the options
$targetOptionExists = false;
if( $arrayNode['type'] == 'dropdown' && isset($arrayNode[$_TARGET_LANG]) && isset($arrayNode[$_TARGET_LANG][0]) && isset($arrayNode[$_TARGET_LANG][0]['option']) ) {
if( isset($arrayNode[$_TARGET_LANG]) && isset($arrayNode[$_TARGET_LANG][0]) && isset($arrayNode[$_TARGET_LANG][0]['option']) ) {
$targetOptionNode = $arrayNode[$_TARGET_LANG][0]['option'];
$targetOptionExists = true;
}
@@ -247,6 +247,7 @@ foreach ($aXMLForms as $xmlFormPath) {
$originOptionValue = getTextValue($optionNode);
if( $targetOptionExists ){
$targetOptionValue = getMatchDropdownOptionValue($optionName, $targetOptionNode);
if( $targetOptionValue === false ){
$targetOptionValue = $originOptionValue;
@@ -256,10 +257,10 @@ foreach ($aXMLForms as $xmlFormPath) {
}
$targetOptionValue = ($targetOptionValue != '') ? $targetOptionValue : "''";
$targetOptionValue = ($optionName != '') ? $optionName : "''";
$optionName = ($optionName != '') ? $optionName : "''";
$msgid = '[' . $xmlFormFile . '?' . $nodeName . '-' . $optionName . ']';
/* g::dump($xmlFormFile . '?' . $nodeName . '-'. $originOptionValue);
/*g::dump($xmlFormFile . '?' . $nodeName . '-'. $originOptionValue);
g::dump($xmlFormFile);
g::dump($nodeType . ' - ' . $nodeName . ' - ' . $originOptionValue);
g::dump($msgid);