Quote table names in admin_get_XXX() functions of t3lib_db
authorMartin Kutschker <martin.t.kutschker@blackbox.net>
Mon, 12 Mar 2007 20:45:28 +0000 (20:45 +0000)
committerMartin Kutschker <martin.t.kutschker@blackbox.net>
Mon, 12 Mar 2007 20:45:28 +0000 (20:45 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2187 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_db.php

index 43e1d22..ffd85e1 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
 
        * Replace all TINYTEXT columns with VARCHAR(255)
        * Change index "parent" of fe_user to (pid,username) and drop the index "pid"
+       * Quote table names in admin_get_XXX() functions of t3lib_db
 
 2007-03-06  Michael Stucki  <michael@typo3.org>
 
index 925c1e9..9cf155d 100755 (executable)
@@ -983,7 +983,7 @@ class t3lib_DB {
        function admin_get_fields($tableName)   {
                $output = array();
 
-               $columns_res = mysql_query('SHOW columns FROM '.$tableName, $this->link);
+               $columns_res = mysql_query('SHOW columns FROM `'.$tableName.'`', $this->link);
                while($fieldRow = mysql_fetch_assoc($columns_res))      {
                        $output[$fieldRow['Field']] = $fieldRow;
                }
@@ -1001,7 +1001,7 @@ class t3lib_DB {
        function admin_get_keys($tableName)     {
                $output = array();
 
-               $keyRes = mysql_query('SHOW keys FROM '.$tableName, $this->link);
+               $keyRes = mysql_query('SHOW keys FROM `'.$tableName.'`', $this->link);
                while($keyRow = mysql_fetch_assoc($keyRes))     {
                        $output[] = $keyRow;
                }