Fixed bug: List all fe_groups in page icon tooltip (patch by Michael Stucki)
authorOliver Hader <oliver.hader@typo3.org>
Sun, 25 Feb 2007 10:12:47 +0000 (10:12 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Sun, 25 Feb 2007 10:12:47 +0000 (10:12 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2152 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_befunc.php

index ae2a3aa..63370d6 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2007-02-25  Oliver Hader  <oh@inpublica.de>
 
        * Fixed bug #5055: SQL problem with reviewstate in EM (thanks to Franz-Xaver Koch)
+       * Fixed bug: List all fe_groups in page icon tooltip (patch by Michael Stucki)
 
 2007-02-24  Ernesto Baschny  <ernst@cron-it.de>
 
index d8944d6..a3d8d1c 100755 (executable)
@@ -1705,12 +1705,16 @@ class t3lib_BEfunc      {
                if ($row['starttime'])  $parts[] = $LANG->sL($TCA['pages']['columns']['starttime']['label']).' '.t3lib_BEfunc::dateTimeAge($row['starttime'],-1,'date');
                if ($row['endtime'])    $parts[] = $LANG->sL($TCA['pages']['columns']['endtime']['label']).' '.t3lib_BEfunc::dateTimeAge($row['endtime'],-1,'date');
                if ($row['fe_group'])   {
-                       if ($row['fe_group']<0) {
-                               $label = $LANG->sL(t3lib_BEfunc::getLabelFromItemlist('pages','fe_group',$row['fe_group']));
-                       } else {
-                               $lRec = t3lib_BEfunc::getRecordWSOL('fe_groups',$row['fe_group'],'title');
-                               $label = $lRec['title'];
+                       $fe_groups = array();
+                       foreach (t3lib_div::intExplode(',',$row['fe_group']) as $fe_group)      {
+                               if ($fe_group<0)        {
+                                       $fe_groups[] = $LANG->sL(t3lib_BEfunc::getLabelFromItemlist('pages','fe_group',$fe_group));
+                               } else {
+                                       $lRec = t3lib_BEfunc::getRecordWSOL('fe_groups',$fe_group,'title');
+                                       $fe_groups[] = $lRec['title'];
+                               }
                        }
+                       $label = implode(', ',$fe_groups);
                        $parts[] = $LANG->sL($TCA['pages']['columns']['fe_group']['label']).' '.$label;
                }
                $out = htmlspecialchars(implode(' - ',$parts));