Fixed bug #15292: Fatal error in DB browser because of wrong sprite API usage (thanks...
authorSusanne Moog <typo3@susannemoog.de>
Sun, 1 Aug 2010 12:58:14 +0000 (12:58 +0000)
committerSusanne Moog <typo3@susannemoog.de>
Sun, 1 Aug 2010 12:58:14 +0000 (12:58 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8460 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/class.browse_links.php

index 8fb3cd8..da77b12 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-08-01  Susanne Moog  <typo3@susanne-moog.de>
+
+       * Fixed bug #15292: Fatal error in DB browser because of wrong sprite API usage (thanks to Alexandre Gravel-Raymond)
+
 2010-07-30  Steffen Kamper  <steffen@typo3.org>
 
        * Follow-up to bug #15188: Remove default greyed out effect for CEs (Thanks to Steffen Gebert)
index 9ae80bf..9774586 100644 (file)
@@ -1912,14 +1912,19 @@ class browse_links {
                        $ATag='';
                        $ATag_e='';
                        $ATag2='';
-                       if (in_array('pages',$tablesArr))       {
-                               $ficon=t3lib_iconWorks::getIcon('pages',$mainPageRec);
-                               $ATag="<a href=\"#\" onclick=\"return insertElement('pages', '".$mainPageRec['uid']."', 'db', ".t3lib_div::quoteJSvalue($mainPageRec['title']).", '', '', '".$ficon."','',1);\">";
-                               $ATag2="<a href=\"#\" onclick=\"return insertElement('pages', '".$mainPageRec['uid']."', 'db', ".t3lib_div::quoteJSvalue($mainPageRec['title']).", '', '', '".$ficon."','',0);\">";
-                               $ATag_alt=substr($ATag,0,-4).",'',1);\">";
-                               $ATag_e='</a>';
+                       $picon = '';
+                       if (is_array($mainPageRec)) {
+                               $picon = t3lib_iconWorks::getSpriteIconForRecord('pages', $mainPageRec);
+                               if (in_array('pages', $tablesArr)) {
+                                       $ficon = $picon;
+                                       $ATag = "<a href=\"#\" onclick=\"return insertElement('pages', '" . $mainPageRec['uid'] .
+                                               "', 'db', " . t3lib_div::quoteJSvalue($mainPageRec['title']) . ", '', '', '" . $ficon . "','',1);\">";
+                                       $ATag2 = "<a href=\"#\" onclick=\"return insertElement('pages', '" . $mainPageRec['uid'] .
+                                               "', 'db', " . t3lib_div::quoteJSvalue($mainPageRec['title']) . ", '', '', '" . $ficon . "','',0);\">";
+                                       $ATag_alt = substr($ATag, 0, -4) . ",'',1);\">";
+                                       $ATag_e = '</a>';
+                               }
                        }
-                       $picon=t3lib_iconWorks::getSpriteIconForRecord('pages', $mainPageRec);
                        $pBicon=$ATag2?'<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/plusbullet2.gif','width="18" height="16"').' alt="" />':'';
                        $pText=htmlspecialchars(t3lib_div::fixed_lgd_cs($mainPageRec['title'],$titleLen));
                        $out.=$picon.$ATag2.$pBicon.$ATag_e.$ATag.$pText.$ATag_e.'<br />';