The branch, master has been updated via bb3f6affeaaf305998675f5f8198feb5739f1590 (commit) from e4bdbc2f4115baf930c4e1f1629fae85b03c36b4 (commit)
- Log ----------------------------------------------------------------- commit bb3f6affeaaf305998675f5f8198feb5739f1590 Author: Marc Delisle marc@infomarc.info Date: Sat Mar 26 07:57:02 2011 -0400
Obey the ShowSQL directive also for inline edit
-----------------------------------------------------------------------
Summary of changes: js/sql.js | 7 +++++++ sql.php | 4 ++-- tbl_replace.php | 4 +++- 3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/js/sql.js b/js/sql.js index 15c780f..5b0fc08 100644 --- a/js/sql.js +++ b/js/sql.js @@ -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); diff --git a/sql.php b/sql.php index 50026b9..abc1ccf 100644 --- a/sql.php +++ b/sql.php @@ -709,8 +709,8 @@ if (0 == $num_rows || $is_affected) { } }
- 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; diff --git a/tbl_replace.php b/tbl_replace.php index b15212b..ab8cd10 100644 --- a/tbl_replace.php +++ b/tbl_replace.php @@ -326,9 +326,11 @@ if ($is_insert && count($value_sets) > 0) { 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);
hooks/post-receive