From 603b6bf47b3b8eab1e936613b6294a79fa24c0a2 Mon Sep 17 00:00:00 2001 From: ninadsp Date: Mon, 21 Jun 2010 02:04:45 +0530 Subject: [PATCH] Added the PMA_ajaxResponse function for Ajax requests that change the database charset. Required for db_operations.php --- libraries/db_common.inc.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libraries/db_common.inc.php b/libraries/db_common.inc.php index 955e7c8c5..bfdde2369 100755 --- a/libraries/db_common.inc.php +++ b/libraries/db_common.inc.php @@ -57,6 +57,15 @@ if (isset($submitcollation) && !empty($db_collation)) { $result = PMA_DBI_query($sql_query); $message = PMA_Message::success(); unset($db_charset, $db_collation); + + /** + * If we are in an Ajax request, let us stop the execution here. Necessary for + * db charset change action on db_operations.php. If this causes a bug on + * other pages, we might have to move this to a different location. + */ + if( $GLOBALS['is_ajax_request'] == true) { + PMA_ajaxResponse($message, $message->isSuccess()); + }; } $GLOBALS['js_include'][] = 'functions.js';