From 1fb69c0c63a1e6554b480ea139e4d319e6a5a93b Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Mon, 3 Dec 2007 18:01:35 +0000 Subject: [PATCH] bug #1843428 [GUI] Space issue with DROP/DELETE/ALTER TABLE --- ChangeLog | 3 +++ js/functions.js | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7c7e72531..bd9f9d199 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,9 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA that it might later support other formats like JSON in the same plugin + [lang] Finnish update, thanks to Jouni Kahkonen +2.11.4.0 (not yet released) +- bug #1843428 [GUI] Space issue with DROP/DELETE/ALTER TABLE + 2.11.3.0 (not yet released) - patch #1818389 to remove a notice (failed to flush buffer), thanks to Bertrand diff --git a/js/functions.js b/js/functions.js index 85e29715b..e821c7161 100644 --- a/js/functions.js +++ b/js/functions.js @@ -159,9 +159,9 @@ function confirmQuery(theForm1, sqlQuery1) // For now, I just added a ^ to check for the statement at // beginning of expression - var do_confirm_re_0 = new RegExp('^DROP\\s+(IF EXISTS\\s+)?(TABLE|DATABASE)\\s', 'i'); - var do_confirm_re_1 = new RegExp('^ALTER\\s+TABLE\\s+((`[^`]+`)|([A-Za-z0-9_$]+))\\s+DROP\\s', 'i'); - var do_confirm_re_2 = new RegExp('^DELETE\\s+FROM\\s', 'i'); + var do_confirm_re_0 = new RegExp('^\\s*DROP\\s+(IF EXISTS\\s+)?(TABLE|DATABASE)\\s', 'i'); + var do_confirm_re_1 = new RegExp('^\\s*ALTER\\s+TABLE\\s+((`[^`]+`)|([A-Za-z0-9_$]+))\\s+DROP\\s', 'i'); + var do_confirm_re_2 = new RegExp('^\\s*DELETE\\s+FROM\\s', 'i'); if (do_confirm_re_0.test(sqlQuery1.value) || do_confirm_re_1.test(sqlQuery1.value) || do_confirm_re_2.test(sqlQuery1.value)) {