The branch, QA_3_3 has been updated
via dda6de20d25f4622b36407c46e87d59d7820131c (commit)
from 789d3a4131c9af4cd22c8a1d4104eaa5e87aae25 (commit)
- Log -----------------------------------------------------------------
commit dda6de20d25f4622b36407c46e87d59d7820131c
Author: Marc Delisle <marc(a)infomarc.info>
Date: Tue Aug 10 17:55:04 2010 -0400
bug #3042706 [pmadb] Relations, bookmarks, etc deleted after table drop
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 1 +
libraries/header.inc.php | 5 ++++-
libraries/tbl_links.inc.php | 1 -
sql.php | 3 +++
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 20ebbca..a2a7ed9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,7 @@ $HeadURL:
https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
thanks to Will Palmer - wpalmer
- bug #3040226 [XHTML] LockFromUpdate checkbox not checked by default
- bug [doc] Withdraw or edit FAQ entries related to older MySQL or PHP
+- bug #3042706 [pmadb] Relations, bookmarks, etc deleted after table drop
3.3.5.0 (2010-07-26)
- patch #2932113 [information_schema] Slow export when having lots of
diff --git a/libraries/header.inc.php b/libraries/header.inc.php
index 932fb80..0f63a94 100644
--- a/libraries/header.inc.php
+++ b/libraries/header.inc.php
@@ -106,7 +106,10 @@ if (empty($GLOBALS['is_header_sent'])) {
$GLOBALS['strDatabase'],
's_db.png');
- if (strlen($GLOBALS['table'])) {
+ // if the table is being dropped, $_REQUEST['purge'] is set
+ // (it always contains "1")
+ // so do not display the table name in upper div
+ if (strlen($GLOBALS['table']) && !
(isset($_REQUEST['purge']))) {
require_once './libraries/tbl_info.inc.php';
echo $separator;
diff --git a/libraries/tbl_links.inc.php b/libraries/tbl_links.inc.php
index 4731501..b6c9121 100644
--- a/libraries/tbl_links.inc.php
+++ b/libraries/tbl_links.inc.php
@@ -114,7 +114,6 @@ if (! $tbl_is_view && ! (isset($db_is_information_schema)
&& $db_is_information_
if (! (isset($db_is_information_schema) && $db_is_information_schema)) {
$tabs['drop']['icon'] = 'b_deltbl.png';
$tabs['drop']['link'] = 'sql.php';
- $tabs['drop']['url_params'] = array('table' => NULL);
$tabs['drop']['text'] = $strDrop;
$tabs['drop']['args']['reload'] = 1;
$tabs['drop']['args']['purge'] = 1;
diff --git a/sql.php b/sql.php
index 4898860..4dbfee2 100644
--- a/sql.php
+++ b/sql.php
@@ -459,6 +459,9 @@ if (isset($GLOBALS['show_as_php']) ||
!empty($GLOBALS['validatequery'])) {
if (strlen($table) && strlen($db)) {
PMA_relationsCleanupTable($db, $table);
+ // this is to avoid counting rows for nothing, below
+ // (do not unset as $table is used further down in the logic)
+ $table = '';
} elseif (strlen($db)) {
PMA_relationsCleanupDatabase($db);
} else {
hooks/post-receive
--
phpMyAdmin