From 9a45818b225ad7f110e710321941cc2deee73b85 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 15 Jul 2009 09:46:45 +0000 Subject: [PATCH] bug #2821757 [insert] "Insert another new row" no longer worked --- ChangeLog | 1 + tbl_replace.php | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 62edeebe8..5720f161a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA - bug #2816840 [priv] Cannot change a user's details - bug #2816165 [display] Executed query not always displayed - bug #2819944 [setup] Incorrect mention of designer_coords +- bug #2821757 [insert] "Insert another new row" no longer worked 3.2.0.1 (2009-06-30) - [security] XSS: Insufficient output sanitizing in bookmarks diff --git a/tbl_replace.php b/tbl_replace.php index c2b55d75a..1644478b2 100644 --- a/tbl_replace.php +++ b/tbl_replace.php @@ -420,6 +420,16 @@ $GLOBALS['js_include'][] = 'functions.js'; $GLOBALS['js_include'][] = 'mootools.js'; $active_page = $goto_include; + +/** + * If user asked for "and then Insert another new row" we have to remove + * primary key information so that tbl_change.php does not go back + * to the current record + */ +if (isset($_REQUEST['after_insert']) && 'new_insert' == $_REQUEST['after_insert']) { + unset($_REQUEST['primary_key']); +} + /** * Load header. */