Follow-up to bug #8305: SQL debug output is not shown in the Backend
authorSteffen Kamper <info@sk-typo3.de>
Wed, 9 Jun 2010 13:30:28 +0000 (13:30 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Wed, 9 Jun 2010 13:30:28 +0000 (13:30 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7846 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
NEWS.txt
t3lib/class.t3lib_div.php
typo3/sysext/cms/tslib/publish.php
typo3/sysext/impexp/class.tx_impexp.php
typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php

index 52d9d44..958d5a6 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2010-06-08  Steffen Kamper  <info@sk-typo3.de>
 
+       * Follow-up to bug #8305: SQL debug output is not shown in the Backend
        * Added test case t3lib_utility_clientTest.php
        * Fixed bug #14458: getBrowserInfo fails with IE UA Strings
 
index 06938a8..d0864d1 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -97,6 +97,8 @@ Development
 
        * The debug in BE was enhanced. There is a new debug console, which will show each debug in a single tab. The console will pop up as soon a debug statement is present.
        
+       * t3lib_div::debug(): Removed the feature of passing an integer as $header (second argument) to add multiple br-tags.
+       
        * There is a new API in place to generate HTML <span> tags with corresponding CSS classes in order to display previously created sprite images in the right background position. Make sure to have a look at "t3lib_iconWorks::getSpriteIconForRecord($table, $row)", "t3lib_iconWorks::getSpriteIconForFile('myimage.png')", and "t3lib_iconWorks::getSpriteIcon('actions-document-open')".
 
 
index 460a774..705b38e 100644 (file)
@@ -5033,7 +5033,7 @@ final class t3lib_div {
                        if ($errorMode == 2) {
                                throw new Exception($errorMsg);
                        } elseif(!$errorMode)   {
-                               debug($errorMsg, 1);
+                               debug($errorMsg, 't3lib_div::callUserFunction');
                        }
                        return false;
                }
@@ -5074,7 +5074,7 @@ final class t3lib_div {
                                        if ($errorMode == 2) {
                                                throw new Exception($errorMsg);
                                        } elseif(!$errorMode)   {
-                                               debug($errorMsg, 1);
+                                               debug($errorMsg, 't3lib_div::callUserFunction');
                                        }
                                }
                        } else {
@@ -5082,7 +5082,7 @@ final class t3lib_div {
                                if ($errorMode == 2) {
                                        throw new Exception($errorMsg);
                                } elseif(!$errorMode)   {
-                                       debug($errorMsg, 1);
+                                       debug($errorMsg, 't3lib_div::callUserFunction');
                                }
                        }
                } else {        // Function
@@ -5093,7 +5093,7 @@ final class t3lib_div {
                                if ($errorMode == 2) {
                                        throw new Exception($errorMsg);
                                } elseif(!$errorMode)   {
-                                       debug($errorMsg, 1);
+                                       debug($errorMsg, 't3lib_div::callUserFunction');
                                }
                        }
                }
@@ -5140,7 +5140,7 @@ final class t3lib_div {
                                !self::isFirstPartOfStr(trim($class),$checkPrefix) &&
                                !self::isFirstPartOfStr(trim($class),'tx_')
                                )       {
-                               if (!$silent)   debug("Class '".$class."' was not prepended with '".$checkPrefix."'",1);
+                               if (!$silent)   debug("Class '".$class."' was not prepended with '".$checkPrefix."'", 't3lib_div::getUserObj');
                                return FALSE;
                        }
 
@@ -5155,7 +5155,7 @@ final class t3lib_div {
 
                                return $classObj;
                        } else {
-                               if (!$silent)   debug("<strong>ERROR:</strong> No class named: ".$class,1);
+                               if (!$silent)   debug("<strong>ERROR:</strong> No class named: ".$class, 't3lib_div::getUserObj');
                        }
                }
        }
index e86d0be..e0e6475 100644 (file)
@@ -64,7 +64,7 @@ $temp_publish_array = array();        // Collects the rendered pages.
 
 foreach ($temp_publish_pages as $temp_publish_id) {
        $TT->push('Page '.$temp_publish_id,'');
-//debug($temp_publish_id,1);
+//debug($temp_publish_id);
                $TSFE = t3lib_div::makeInstance('tslib_fe', $TYPO3_CONF_VARS, $temp_publish_id, 0);
 
                $TSFE->initFEuser();
@@ -120,11 +120,11 @@ foreach ($temp_publish_pages as $temp_publish_id) {
 $publishDir = $TYPO3_CONF_VARS['FE']['publish_dir'];
 if ($publishDir && @is_dir($publishDir))       {
        $publishDir = rtrim($publishDir, '/').'/';
-       debug('Publishing in: '.$publishDir,1);
+       debug('Publishing in: '.$publishDir, 'Publish');
        foreach ($temp_publish_array as $key => $val) {
                $file = $publishDir.$key;
                t3lib_div::writeFile($file,$val[2]);
-               debug('Writing: '.$file,1);
+               debug('Writing: '.$file, 'Publish');
        }
 //     debug($temp_publish_array);
 } else {
index e04e0d0..378b4e0 100755 (executable)
@@ -1601,11 +1601,11 @@ class tx_impexp {
                foreach($itemArray as $relDat)  {
                        if (is_array($this->import_mapId[$relDat['table']]) && isset($this->import_mapId[$relDat['table']][$relDat['id']]))     {
 
-                               #debug('FOUND: '.$relDat['table'].':'.$relDat['id'],1);
+                               #debug('FOUND: '.$relDat['table'].':'.$relDat['id']);
                                $valArray[] = $relDat['table'].'_'.$this->import_mapId[$relDat['table']][$relDat['id']];
                        } elseif ($this->isTableStatic($relDat['table']) || $this->isExcluded($relDat['table'], $relDat['id']) || $relDat['id']<0) {    // Checking for less than zero because some select types could contain negative values, eg. fe_groups (-1, -2) and sys_language (-1 = ALL languages). This must be handled on both export and import.
 
-                               #debug('STATIC: '.$relDat['table'].':'.$relDat['id'],1);
+                               #debug('STATIC: '.$relDat['table'].':'.$relDat['id']);
                                $valArray[] = $relDat['table'].'_'.$relDat['id'];
                        } else {
 
@@ -2785,7 +2785,7 @@ class tx_impexp {
 
                                                        $pInfo['msg'] = 'LOST RELATION'.(!$doesRE ? ' (Record not found!)' : ' (Path: '.$lostPath.')');
                                                        $Iprepend = '_lost';
-       #                                               debug('MISSING relation: '.$table.':'.$uid,1);
+       #                                               debug('MISSING relation: '.$table.':'.$uid);
                                                }
                                        } else {
                                                $pInfo['title'] = htmlspecialchars($record['title']);
index 5c15dae..3e6e954 100755 (executable)
@@ -1222,10 +1222,10 @@ class tx_indexedsearch extends tslib_pibase {
                                // If this is NOT found, there is still a theoretical possibility that another user accessible page would display a link, so maybe the resume of such a document here may be unjustified hidden. But better safe than sorry.
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('phash', 'index_grlist', 'phash='.intval($row['phash_t3']).' AND gr_list='.$GLOBALS['TYPO3_DB']->fullQuoteStr($GLOBALS['TSFE']->gr_list, 'index_grlist'));
                        if ($GLOBALS['TYPO3_DB']->sql_num_rows($res))   {
-                               #debug("Look up for external media '".$row['data_filename']."': phash:".$row['phash_t3'].' YES - ('.$GLOBALS['TSFE']->gr_list.")!",1);
+                               #debug("Look up for external media '".$row['data_filename']."': phash:".$row['phash_t3'].' YES - ('.$GLOBALS['TSFE']->gr_list.")!");
                                return TRUE;
                        } else {
-                               #debug("Look up for external media '".$row['data_filename']."': phash:".$row['phash_t3'].' NO - ('.$GLOBALS['TSFE']->gr_list.")!",1);
+                               #debug("Look up for external media '".$row['data_filename']."': phash:".$row['phash_t3'].' NO - ('.$GLOBALS['TSFE']->gr_list.")!");
                                return FALSE;
                        }
                } else {        // Ordinary TYPO3 pages:
@@ -1233,14 +1233,14 @@ class tx_indexedsearch extends tslib_pibase {
                                        // Selecting for the grlist records belonging to the phash-row where the current users gr_list exists. If it is found it is proof that this user has direct access to the phash-rows content although he did not himself initiate the indexing...
                                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('phash', 'index_grlist', 'phash='.intval($row['phash']).' AND gr_list='.$GLOBALS['TYPO3_DB']->fullQuoteStr($GLOBALS['TSFE']->gr_list, 'index_grlist'));
                                if ($GLOBALS['TYPO3_DB']->sql_num_rows($res))   {
-                                       #debug('Checking on it ...'.$row['item_title'].'/'.$row['phash'].' - YES ('.$GLOBALS['TSFE']->gr_list.")",1);
+                                       #debug('Checking on it ...'.$row['item_title'].'/'.$row['phash'].' - YES ('.$GLOBALS['TSFE']->gr_list.")");
                                        return TRUE;
                                } else {
-                                       #debug('Checking on it ...'.$row['item_title'].'/'.$row['phash']." - NOPE",1);
+                                       #debug('Checking on it ...'.$row['item_title'].'/'.$row['phash']." - NOPE");
                                        return FALSE;
                                }
                        } else {
-                                       #debug('Resume can be shown, because the document was in fact indexed by this combination of groups!'.$GLOBALS['TSFE']->gr_list.' - '.$row['item_title'].'/'.$row['phash'],1);
+                                       #debug('Resume can be shown, because the document was in fact indexed by this combination of groups!'.$GLOBALS['TSFE']->gr_list.' - '.$row['item_title'].'/'.$row['phash']);
                                return TRUE;
                        }
                }