Skip to content

Commit

Permalink
Obey the ShowSQL directive also for inline edit
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Delisle committed Mar 26, 2011
1 parent e4bdbc2 commit bb3f6af
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
7 changes: 7 additions & 0 deletions js/sql.js
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,13 @@ $(document).ready(function() {
$.post('tbl_replace.php', post_params, function(data) {
if(data.success == true) {
PMA_ajaxShowMessage(data.message);
// remove possible previous feedback message
$('#result_query').remove();
if (typeof data.result_query != 'undefined') {
// display feedback
$('#sqlqueryresults').prepend('<div id="result_query" align="left"></div>');
$('#result_query').prepend(data.result_query);
}
PMA_unInlineEditRow($del_hide, $chg_submit, $this_td, $input_siblings, data, disp_mode);
} else {
PMA_ajaxShowMessage(data.error);
Expand Down
4 changes: 2 additions & 2 deletions sql.php
Original file line number Diff line number Diff line change
Expand Up @@ -709,8 +709,8 @@
}
}

if(isset($GLOBALS['display_query'])) {
$extra_data['sql_query'] = PMA_showMessage(NULL, $GLOBALS['display_query']);
if ($cfg['ShowSQL']) {
$extra_data['result_query'] = PMA_showMessage($message, $GLOBALS['sql_query'], 'success');
}
if (isset($GLOBALS['reload']) && $GLOBALS['reload'] == 1) {
$extra_data['reload'] = 1;
Expand Down
4 changes: 3 additions & 1 deletion tbl_replace.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,11 @@
unset($query_fields);
} elseif (empty($query)) {
// No change -> move back to the calling script
//
// Note: logic passes here for inline edit
$message = PMA_Message::success(__('No change'));
$active_page = $goto_include;
if(!$GLOBALS['is_ajax_request'] == true) {
if(! $GLOBALS['is_ajax_request'] == true) {
require_once './libraries/header.inc.php';
}
require './' . PMA_securePath($goto_include);
Expand Down

0 comments on commit bb3f6af

Please sign in to comment.