Errors from the Ajax create table dialog where not displayed

This commit is contained in:
Marc Delisle
2011-02-08 17:36:05 -05:00
parent 677e5a5da7
commit 589d918ee7
3 changed files with 13 additions and 8 deletions

View File

@@ -1743,6 +1743,7 @@ $(document).ready(function() {
//User wants to submit the form
$.post($form.attr('action'), $form.serialize() + "&do_save_data=" + $(this).val(), function(data) {
if(data.success == true) {
$('#properties_message').html('');
PMA_ajaxShowMessage(data.message);
$("#create_table_dialog").dialog("close").remove();
@@ -1794,7 +1795,7 @@ $(document).ready(function() {
}
}
else {
PMA_ajaxShowMessage(data.error);
$('#properties_message').html(data.error);
}
}) // end $.post()
}) // end create table form (save)

View File

@@ -786,7 +786,7 @@ if ($action == 'tbl_create.php') {
/>
<?php } ?>
</fieldset>
<div id="properties_message"></div>
</form>
<div id="enum_editor">

View File

@@ -349,6 +349,9 @@ if (isset($_REQUEST['do_save_data'])) {
require './' . $cfg['DefaultTabTable'];
}
exit;
} else {
if ($GLOBALS['is_ajax_request'] == true) {
PMA_ajaxResponse(PMA_DBI_getError(), false);
} else {
PMA_mysqlDie('', '', '', $err_url, false);
// An error happened while inserting/updating a table definition.
@@ -357,6 +360,7 @@ if (isset($_REQUEST['do_save_data'])) {
$num_fields = $_REQUEST['orig_num_fields'];
$regenerate = true;
}
}
} // end do create table
/**