fixed field translations

This commit is contained in:
Roland Gruber 2010-05-07 19:12:59 +00:00
parent f1acd71efd
commit 5d9786ac08
1 changed files with 2 additions and 3 deletions

View File

@ -436,7 +436,7 @@ foreach($_SESSION['currentPDFStructure'] as $key => $entry) {
if($entry['tag'] == "SECTION" && $entry['type'] == "open") { if($entry['tag'] == "SECTION" && $entry['type'] == "open") {
$name = $entry['attributes']['NAME']; $name = $entry['attributes']['NAME'];
if(preg_match("/^_[a-zA-Z0-9_]+_[a-zA-Z0-9_]+/",$name)) { if(preg_match("/^_[a-zA-Z0-9_]+_[a-zA-Z0-9_]+/",$name)) {
$section_headline = translateFieldIDToName(substr($name,1)); $section_headline = translateFieldIDToName(substr($name,1), $_GET['type']);
} }
else { else {
$section_headline = $name; $section_headline = $name;
@ -454,7 +454,7 @@ foreach($_SESSION['currentPDFStructure'] as $key => $entry) {
<?php <?php
foreach($section_items_array as $item) { foreach($section_items_array as $item) {
?> ?>
<option value="_<?php echo $item;?>"<?php echo ((substr($name,1) == $item) ? ' selected' : '');?>><?php echo translateFieldIDToName($item);?></option> <option value="_<?php echo $item;?>"<?php echo ((substr($name,1) == $item) ? ' selected' : '');?>><?php echo translateFieldIDToName($item, $_GET['type']);?></option>
<?php <?php
} }
?> ?>
@ -740,7 +740,6 @@ function translateFieldIDToName($id, $scope) {
} }
} }
} }
} }
return $id; return $id;
} }