Fixed bug #5094: Record alt_label was not processed (patch by Volker Graubaum and...
authorMichael Stucki <michael.stucki@typo3.org>
Fri, 6 Jul 2007 18:26:52 +0000 (18:26 +0000)
committerMichael Stucki <michael.stucki@typo3.org>
Fri, 6 Jul 2007 18:26:52 +0000 (18:26 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2385 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_befunc.php

index 04bbda9..568f99e 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
 
        * Fix in indexed search: List of indexed pages could be broken if mutli-byte chars are cut in the middle (patch by Karsten Dambekalns)
        * Make field selection work in browse_links.php popup (patch by Christian Jul Jensen)
+       * Fixed bug #5094: Record alt_label was not processed (patch by Volker Graubaum and Thomas Hempel)
 
 2007-07-02  Oliver Hader  <oh@inpublica.de>
 
index df18625..32d96f7 100755 (executable)
@@ -1851,12 +1851,18 @@ class t3lib_BEfunc      {
                                if ($TCA[$table]['ctrl']['label_alt'] && ($TCA[$table]['ctrl']['label_alt_force'] || !strcmp($t,'')))   {
                                        $altFields=t3lib_div::trimExplode(',',$TCA[$table]['ctrl']['label_alt'],1);
                                        $tA=array();
-                                       $tA[]=$t;
-                                       if ($TCA[$table]['ctrl']['label_alt_force'])    {
-                                               foreach ($altFields as $fN)     {
-                                                       $t = trim(strip_tags($row[$fN]));
-                                                       if (!empty($t)) $tA[] = $t;
+                                       if (!empty($t)) $tA[] = $t;
+                                       foreach ($altFields as $fN)     {
+                                               $t = trim(strip_tags($row[$fN]));
+                                               if (strcmp($t,''))      {
+                                                       $t = t3lib_BEfunc::getProcessedValue($table,$fN,$t);
+                                                       if (!$TCA[$table]['ctrl']['label_alt_force'])   {
+                                                               break;
+                                                       }
+                                                       $tA[] = $t;
                                                }
+                                       }
+                                       if ($TCA[$table]['ctrl']['label_alt_force'])    {
                                                $t=implode(', ',$tA);
                                        }
                                }