Fixed bug #15580: Add calls to logDeprecatedFunction() for more deprecated functions...
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_db.php
index bcdbf4a..00b1bdf 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 2004-2010 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 2004-2010 Kasper Skårhøj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -32,7 +32,7 @@
  *
  * $Id$
  *
- * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
+ * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
  * In all TYPO3 scripts the global variable $TYPO3_DB is an instance of this class. Use that.
  * Eg.                 $GLOBALS['TYPO3_DB']->sql_fetch_assoc()
  *
- * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
+ * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
  * @package TYPO3
  * @subpackage t3lib
  */
@@ -828,7 +828,7 @@ class t3lib_DB {
         * @see quoteStr()
         */
        function escapeStrForLike($str, $table) {
-               return preg_replace('/[_%]/', '\\\$0', $str);
+               return addcslashes($str, '_%');
        }
 
        /**
@@ -964,7 +964,7 @@ class t3lib_DB {
         * @param       string          Database name
         * @param       string          Query to execute
         * @return      pointer         Result pointer / DBAL object
-        * @deprecated since TYPO3 3.6, will be removed in TYPO3 4.5
+        * @deprecated since TYPO3 3.6, will be removed in TYPO3 4.6
         * @see sql_query()
         */
        function sql($db, $query) {
@@ -1448,7 +1448,7 @@ class t3lib_DB {
                                        'caller' => 't3lib_DB::' . $func,
                                        'ERROR' => $error,
                                        'lastBuiltQuery' => ($query ? $query : $this->debug_lastBuiltQuery),
-                                       'debug_backtrace' => t3lib_div::debug_trail(),
+                                       'debug_backtrace' => t3lib_utility_Debug::debugTrail(),
                                ),
                                $func,
                                is_object($GLOBALS['error']) && @is_callable(array($GLOBALS['error'], 'debug')) ? '' : 'DB Error'
@@ -1523,7 +1523,7 @@ class t3lib_DB {
                }
 
                $error = $this->sql_error();
-               $trail = t3lib_div::debug_trail();
+               $trail = t3lib_utility_Debug::debugTrail();
 
                $explain_tables = array();
                $explain_output = array();
@@ -1578,7 +1578,7 @@ class t3lib_DB {
                                }
 
                                if ($explainMode == 1) {
-                                       t3lib_div::debug($data, 'Tables: ' . $from_table, 'DB SQL EXPLAIN');
+                                       t3lib_utility_Debug::debug($data, 'Tables: ' . $from_table, 'DB SQL EXPLAIN');
                                } elseif ($explainMode == 2) {
                                        $GLOBALS['TT']->setTSselectQuery($data);
                                }