[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_5-6294-gbda213a

Marc Delisle lem9 at users.sourceforge.net
Wed Aug 11 16:48:17 CEST 2010


The branch, master has been updated
       via  bda213a5ac69136a6cf7d96e5ba36d032d718e36 (commit)
      from  ba038ed6e1527d5470a5532d4198889ad80943a9 (commit)


- Log -----------------------------------------------------------------
commit bda213a5ac69136a6cf7d96e5ba36d032d718e36
Author: Marc Delisle <marc at infomarc.info>
Date:   Wed Aug 11 10:48:05 2010 -0400

    bug #3042706 [pmadb] Relations, bookmarks, etc deleted after table drop

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

Summary of changes:
 ChangeLog                |    1 +
 libraries/header.inc.php |    5 ++++-
 sql.php                  |    5 +++++
 tbl_operations.php       |    4 +++-
 4 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f61fac7..4b6bda7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -115,6 +115,7 @@ $Id$
   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 5638583..c6f7107 100644
--- a/libraries/header.inc.php
+++ b/libraries/header.inc.php
@@ -114,7 +114,10 @@ if (empty($GLOBALS['is_header_sent'])) {
                         __('New table'),
                         '',
                         's_tbl.png');
-            } elseif (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
+            } elseif (strlen($GLOBALS['table']) && ! (isset($_REQUEST['purge']))) {
                 require_once './libraries/tbl_info.inc.php';
 
                 echo $separator;
diff --git a/sql.php b/sql.php
index ed6f7d4..a98b9d4 100644
--- a/sql.php
+++ b/sql.php
@@ -530,7 +530,12 @@ if (0 == $num_rows || $is_affected) {
         $goto = PMA_securePath($goto);
         // Checks for a valid target script
         $is_db = $is_table = false;
+        if (isset($_REQUEST['purge'])) {
+            $table = '';
+            unset($url_params['table']);
+        }        
         include 'libraries/db_table_exists.lib.php';
+
         if (strpos($goto, 'tbl_') === 0 && ! $is_table) {
             if (strlen($table)) {
                 $table = '';
diff --git a/tbl_operations.php b/tbl_operations.php
index e2de481..666f6f3 100644
--- a/tbl_operations.php
+++ b/tbl_operations.php
@@ -668,7 +668,9 @@ if (! (isset($db_is_information_schema) && $db_is_information_schema)) {
             'reload' => '1',
             'purge' => '1',
             'zero_rows' => sprintf(($tbl_is_view ? __('View %s has been dropped') : __('Table %s has been dropped')), htmlspecialchars($table)),
-            'table' => NULL,
+            // table name is needed to avoid running 
+            // PMA_relationsCleanupDatabase() on the whole db later
+            'table' => $GLOBALS['table'],
         ));
     ?>
     <li><a href="sql.php<?php echo PMA_generate_common_url($this_url_params); ?>" onclick="return confirmLink(this, '<?php echo PMA_jsFormat($this_sql_query); ?>')">


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list