diff options
author | ninadsp <ninadsp16289@gmail.com> | 2010-08-03 17:40:37 +0400 |
---|---|---|
committer | ninadsp <ninadsp16289@gmail.com> | 2010-08-03 17:40:37 +0400 |
commit | c897adc3a4b58a432a67460d9308ff157401d2d3 (patch) | |
tree | 866b6299b3a37f21343552620cc5bd775a18b5bd /user_password.php | |
parent | 94b7567ec8453ed268305094b9245f82449d99b3 (diff) |
Ajaxified Change Password action on main page
Diffstat (limited to 'user_password.php')
-rwxr-xr-x | user_password.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/user_password.php b/user_password.php index cd84b790a1..0ef8b8677a 100755 --- a/user_password.php +++ b/user_password.php @@ -71,6 +71,10 @@ if (isset($_REQUEST['nopass'])) { $password = $_REQUEST['pma_pw']; } + if($GLOBALS['is_ajax_request'] == true && $_error == true) { + PMA_ajaxResponse($message, false); + } + if (! $_error) { // Defines the url to return to in case of error in the sql statement @@ -101,10 +105,17 @@ if (isset($_REQUEST['nopass'])) { $_url_params['old_usr'] = 'relog'; } + $message = PMA_Message::success(__('The profile has been updated.')); + + if($GLOBALS['is_ajax_request'] == true) { + $extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query, 'success'); + PMA_ajaxResponse($message, true, $extra_data); + } + // Displays the page require_once './libraries/header.inc.php'; echo '<h1>' . __('Change password') . '</h1>' . "\n\n"; - PMA_showMessage(__('The profile has been updated.'), $sql_query, 'success'); + PMA_showMessage($message, $sql_query, 'success'); ?> <a href="index.php<?php echo PMA_generate_common_url($_url_params); ?>" target="_parent"> <strong><?php echo __('Back'); ?></strong></a> |