Fix bug #4943: Redundant comma in label_alt_force
authorThomas Hempel <thomas.hempel@typo3.org>
Sun, 11 Feb 2007 15:27:50 +0000 (15:27 +0000)
committerThomas Hempel <thomas.hempel@typo3.org>
Sun, 11 Feb 2007 15:27:50 +0000 (15:27 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2021 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_befunc.php

index 4ebfffe..5433565 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2007-02-11  Thomas Hempel  <thomas@work.de>
+
+       * Fix bug #4943: Redundant comma in label_alt_force
 
 2007-02-11  Martin Kutschker  <martin.t.kutschker@blackbox.net>
 
index 54c8340..d8944d6 100755 (executable)
@@ -1841,11 +1841,13 @@ class t3lib_BEfunc      {
                                        $altFields=t3lib_div::trimExplode(',',$TCA[$table]['ctrl']['label_alt'],1);
                                        $tA=array();
                                        $tA[]=$t;
-                                       foreach ($altFields as $fN)     {
-                                               $t = $tA[] = trim(strip_tags($row[$fN]));
-                                               if (strcmp($t,'') && !$TCA[$table]['ctrl']['label_alt_force'])  break;
+                                       if ($TCA[$table]['ctrl']['label_alt_force'])    {
+                                               foreach ($altFields as $fN)     {
+                                                       $t = trim(strip_tags($row[$fN]));
+                                                       if (!empty($t)) $tA[] = $t;
+                                               }
+                                               $t=implode(', ',$tA);
                                        }
-                                       if ($TCA[$table]['ctrl']['label_alt_force'])    $t=implode(', ',$tA);
                                }
                        }