The branch, master has been updated
       via  824fac0da5af56dbad589cebe47a1f3587d022fc (commit)
       via  fd441451832312cb5c76c46be80d075f0e8fa435 (commit)
       via  73485871c7770dcbe263dcb08aec54c18f70678b (commit)
       via  cc4743d396e4754d30a81458e4ecb4aca33fc9d0 (commit)
       via  e2eb8a28dad7d07ab24c84685d388d4b230a4f92 (commit)
      from  2704835c4aea9abae0fb8836f98cce7809927b1d (commit)


- Log -----------------------------------------------------------------
commit 824fac0da5af56dbad589cebe47a1f3587d022fc
Author: Piotr Przybylski <[email protected]>
Date:   Tue Aug 16 00:09:04 2011 +0200

    Import missing variable into method's scope

commit fd441451832312cb5c76c46be80d075f0e8fa435
Author: Piotr Przybylski <[email protected]>
Date:   Tue Aug 16 00:07:57 2011 +0200

    Add missing PMA_sqlAddSlashes

commit 73485871c7770dcbe263dcb08aec54c18f70678b
Author: Piotr Przybylski <[email protected]>
Date:   Tue Aug 16 00:05:51 2011 +0200

    PMA_backquote is not needed here

commit cc4743d396e4754d30a81458e4ecb4aca33fc9d0
Author: Piotr Przybylski <[email protected]>
Date:   Tue Aug 16 00:05:26 2011 +0200

    'comment' is not a reserved keyword, remove PMA_backquote

commit e2eb8a28dad7d07ab24c84685d388d4b230a4f92
Author: Piotr Przybylski <[email protected]>
Date:   Tue Aug 16 00:04:44 2011 +0200

    PMA_backquote is not needed for string literals

-----------------------------------------------------------------------

Summary of changes:
 db_tracking.php                        |    6 +++---
 libraries/Table.class.php              |    4 ++--
 libraries/Tracker.class.php            |    4 ++--
 libraries/import/docsql.php            |    2 +-
 libraries/schema/User_Schema.class.php |    5 +++--
 tbl_tracking.php                       |   10 +++++-----
 6 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/db_tracking.php b/db_tracking.php
index df1106e..29d8cc8 100644
--- a/db_tracking.php
+++ b/db_tracking.php
@@ -67,9 +67,9 @@ require_once './libraries/db_links.inc.php';
 $all_tables_query = ' SELECT table_name, MAX(version) as version FROM ' .
              PMA_backquote($GLOBALS['cfg']['Server']['pmadb']) . '.' .
              PMA_backquote($GLOBALS['cfg']['Server']['tracking']) .
-             ' WHERE ' . PMA_backquote('db_name')    . ' = \'' . 
PMA_sqlAddSlashes($_REQUEST['db']) . '\' ' .
-             ' GROUP BY '. PMA_backquote('table_name') .
-             ' ORDER BY '. PMA_backquote('table_name') .' ASC';
+             ' WHERE db_name = \'' . PMA_sqlAddSlashes($_REQUEST['db']) . '\' 
' .
+             ' GROUP BY table_name' .
+             ' ORDER BY table_name ASC';
 
 $all_tables_result = PMA_query_as_controluser($all_tables_query);
 
diff --git a/libraries/Table.class.php b/libraries/Table.class.php
index 512ca2e..d018cd7 100644
--- a/libraries/Table.class.php
+++ b/libraries/Table.class.php
@@ -910,7 +910,7 @@ class PMA_Table
                 if ($GLOBALS['cfgRelation']['commwork']) {
                     // Get all comments and MIME-Types for current table
                     $comments_copy_query = 'SELECT
-                                                column_name, ' . 
PMA_backquote('comment') . ($GLOBALS['cfgRelation']['mimework'] ? ', mimetype, 
transformation, transformation_options' : '') . '
+                                                column_name, comment' . 
($GLOBALS['cfgRelation']['mimework'] ? ', mimetype, transformation, 
transformation_options' : '') . '
                                             FROM ' . 
PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . 
PMA_backquote($GLOBALS['cfgRelation']['column_info']) . '
                                             WHERE
                                                 db_name = \'' . 
PMA_sqlAddSlashes($source_db) . '\' AND
@@ -920,7 +920,7 @@ class PMA_Table
                     // Write every comment as new copied entry. [MIME]
                     while ($comments_copy_row = 
PMA_DBI_fetch_assoc($comments_copy_rs)) {
                         $new_comment_query = 'REPLACE INTO ' . 
PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . 
PMA_backquote($GLOBALS['cfgRelation']['column_info'])
-                                    . ' (db_name, table_name, column_name, ' . 
PMA_backquote('comment') . ($GLOBALS['cfgRelation']['mimework'] ? ', mimetype, 
transformation, transformation_options' : '') . ') '
+                                    . ' (db_name, table_name, column_name, 
comment' . ($GLOBALS['cfgRelation']['mimework'] ? ', mimetype, transformation, 
transformation_options' : '') . ') '
                                     . ' VALUES('
                                     . '\'' . PMA_sqlAddSlashes($target_db) . 
'\','
                                     . '\'' . PMA_sqlAddSlashes($target_table) 
. '\','
diff --git a/libraries/Tracker.class.php b/libraries/Tracker.class.php
index 947044a..aa176ea 100644
--- a/libraries/Tracker.class.php
+++ b/libraries/Tracker.class.php
@@ -219,8 +219,8 @@ class PMA_Tracker
 
         $sql_query =
         " SELECT tracking_active FROM " . self::$pma_table .
-        " WHERE " . PMA_backquote('db_name') . " = '" . 
PMA_sqlAddSlashes($dbname) . "' " .
-        " AND " . PMA_backquote('table_name') . " = '" . 
PMA_sqlAddSlashes($tablename) . "' " .
+        " WHERE db_name = '" . PMA_sqlAddSlashes($dbname) . "' " .
+        " AND table_name = '" . PMA_sqlAddSlashes($tablename) . "' " .
         " ORDER BY version DESC";
 
         $row = PMA_DBI_fetch_array(PMA_query_as_controluser($sql_query));
diff --git a/libraries/import/docsql.php b/libraries/import/docsql.php
index 4ba089a..4710940 100644
--- a/libraries/import/docsql.php
+++ b/libraries/import/docsql.php
@@ -66,7 +66,7 @@ if ($data === true && !$error && !$timeout_passed) {
             $qry = '
                  INSERT INTO
                         ' . PMA_backquote($cfgRelation['db']) . '.' . 
PMA_backquote($cfgRelation['column_info']) . '
-                      (db_name, table_name, column_name, ' . 
PMA_backquote('comment') . ')
+                      (db_name, table_name, column_name, comment)
                  VALUES (
                         \'' . PMA_sqlAddSlashes($GLOBALS['db']) . '\',
                         \'' . PMA_sqlAddSlashes(trim($tab)) . '\',
diff --git a/libraries/schema/User_Schema.class.php 
b/libraries/schema/User_Schema.class.php
index aa17c47..986efad 100644
--- a/libraries/schema/User_Schema.class.php
+++ b/libraries/schema/User_Schema.class.php
@@ -441,6 +441,7 @@ class PMA_User_Schema
     */
     private function _deleteTables($db, $chpage, $tabExist)
     {
+        global $table;
         $_strtrans  = '';
         $_strname   = '';
         $shoot      = false;
@@ -683,9 +684,9 @@ class PMA_User_Schema
              */
             $master_tables = 'SELECT COUNT(master_table), master_table'
                            . ' FROM ' . 
PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . 
PMA_backquote($cfgRelation['relation'])
-                           . ' WHERE master_db = \'' . $db . '\''
+                           . ' WHERE master_db = \'' . PMA_sqlAddSlashes($db) 
. '\''
                            . ' GROUP BY master_table'
-                           . ' ORDER BY ' . 
PMA_backquote('COUNT(master_table)') . ' DESC ';
+                           . ' ORDER BY COUNT(master_table) DESC';
             $master_tables_rs = PMA_query_as_controluser($master_tables, 
false, PMA_DBI_QUERY_STORE);
             if ($master_tables_rs && PMA_DBI_num_rows($master_tables_rs) > 0) {
                 /* first put all the master tables at beginning
diff --git a/tbl_tracking.php b/tbl_tracking.php
index 76ed16a..b601348 100644
--- a/tbl_tracking.php
+++ b/tbl_tracking.php
@@ -575,8 +575,8 @@ if (isset($_REQUEST['report']) || 
isset($_REQUEST['report_export'])) {
 $sql_query = " SELECT DISTINCT db_name, table_name FROM " .
              PMA_backquote($GLOBALS['cfg']['Server']['pmadb']) . "." .
              PMA_backquote($GLOBALS['cfg']['Server']['tracking']) .
-             " WHERE " . PMA_backquote('db_name') . " = '" . 
PMA_sqlAddSlashes($GLOBALS['db']) . "' " .
-             " ORDER BY ". PMA_backquote('db_name') . ", " . 
PMA_backquote('table_name');
+             " WHERE db_name = '" . PMA_sqlAddSlashes($GLOBALS['db']) . "' " .
+             " ORDER BY db_name, table_name";
 
 $sql_result = PMA_query_as_controluser($sql_query);
 
@@ -615,9 +615,9 @@ if (PMA_DBI_num_rows($sql_result) > 0) {
 $sql_query = " SELECT * FROM " .
              PMA_backquote($GLOBALS['cfg']['Server']['pmadb']) . "." .
              PMA_backquote($GLOBALS['cfg']['Server']['tracking']) .
-             " WHERE " . PMA_backquote('db_name')    . " = '" . 
PMA_sqlAddSlashes($_REQUEST['db']) . "' ".
-             " AND "   . PMA_backquote('table_name') . " = '" . 
PMA_sqlAddSlashes($_REQUEST['table']) ."' ".
-             " ORDER BY ". PMA_backquote('version') . " DESC ";
+             " WHERE db_name = '" . PMA_sqlAddSlashes($_REQUEST['db']) . "' ".
+             " AND table_name = '" . PMA_sqlAddSlashes($_REQUEST['table']) ."' 
".
+             " ORDER BY version DESC ";
 
 $sql_result = PMA_query_as_controluser($sql_query);
 


hooks/post-receive
-- 
phpMyAdmin

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Phpmyadmin-git mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/phpmyadmin-git

Reply via email to