The branch, master has been updated
via 11465727162f945c331f8fa4d7a13dc2c466024e (commit)
via 5cd731b232b3e7d4aa9d3d2cc6c276e52e6459f0 (commit)
from e3f09710dc121148e8421c8d07e87deba1899f63 (commit)
- Log -----------------------------------------------------------------
commit 11465727162f945c331f8fa4d7a13dc2c466024e
Author: Piotr Przybylski <[email protected]>
Date: Tue Aug 16 19:53:11 2011 +0200
Use PMA_DBI_get_columns in Tracker code
commit 5cd731b232b3e7d4aa9d3d2cc6c276e52e6459f0
Author: Piotr Przybylski <[email protected]>
Date: Tue Aug 16 19:33:09 2011 +0200
Make this usage of $sql_backquotes less cryptic
-----------------------------------------------------------------------
Summary of changes:
libraries/Tracker.class.php | 14 ++++++--------
libraries/export/sql.php | 4 ++--
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/libraries/Tracker.class.php b/libraries/Tracker.class.php
index 5d24b78..bb106a9 100644
--- a/libraries/Tracker.class.php
+++ b/libraries/Tracker.class.php
@@ -273,13 +273,13 @@ class PMA_Tracker
$date = date('Y-m-d H:i:s');
// Get data definition snapshot of table
- $sql_query = '
- SHOW FULL COLUMNS FROM ' . PMA_backquote($dbname) . '.' .
PMA_backquote($tablename);
-
- $sql_result = PMA_DBI_query($sql_query);
- while ($row = PMA_DBI_fetch_array($sql_result)) {
- $columns[] = $row;
+ $columns = PMA_DBI_get_columns($dbname, $tablename, true);
+ // int indices to reduce size
+ $columns = array_values($columns);
+ // remove Privileges to reduce size
+ for ($i = 0; $i < count($columns); $i++) {
+ unset($columns[$i]['Privileges']);
}
$sql_query = '
@@ -387,8 +387,6 @@ class PMA_Tracker
*/
static public function createDatabaseVersion($dbname, $version, $query,
$tracking_set = 'CREATE DATABASE,ALTER DATABASE,DROP DATABASE')
{
- global $sql_backquotes;
-
$date = date('Y-m-d H:i:s');
if ($tracking_set == '') {
diff --git a/libraries/export/sql.php b/libraries/export/sql.php
index a561bb6..40efc2b 100644
--- a/libraries/export/sql.php
+++ b/libraries/export/sql.php
@@ -297,8 +297,8 @@ if (isset($plugin_list)) {
/**
* Avoids undefined variables, use NULL so isset() returns false
*/
- if (! isset($sql_backquotes)) {
- $sql_backquotes = null;
+ if (! isset($GLOBALS['sql_backquotes'])) {
+ $GLOBALS['sql_backquotes'] = null;
}
/**
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