From 73696f116f84428ef16a73962a6c1224a47f2bcf Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 9 May 2007 13:10:08 +0000 Subject: [PATCH] bug #1712570 Deleting last record freezes (sorry for the double commit) --- ChangeLog | 1 + sql.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index cf000ee12..0c8c984a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -62,6 +62,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA + [data] display all warnings, not only last one - typo in fix for bug #1671813 - bug #1714908 Inserted Row Count is wrong +- bug #1712570 Deleting last record freezes 2.10.1.0 (2007-04-23) ===================== diff --git a/sql.php b/sql.php index 98d5d557e..a3006e992 100644 --- a/sql.php +++ b/sql.php @@ -642,6 +642,10 @@ if ($num_rows < 1 || $is_affected) { $active_page = $goto; require './' . $goto; } else { + // avoid a redirect loop when last record was deleted + if ('sql.php' == $cfg['DefaultTabTable']) { + $goto = str_replace('sql.php','tbl_structure.php',$goto); + } PMA_sendHeaderLocation($cfg['PmaAbsoluteUri'] . str_replace('&', '&', $goto) . '&message=' . urlencode($message)); } // end else exit();