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

@@ -350,12 +350,16 @@ if (isset($_REQUEST['do_save_data'])) {
}
exit;
} else {
PMA_mysqlDie('', '', '', $err_url, false);
// An error happened while inserting/updating a table definition.
// to prevent total loss of that data, we embed the form once again.
// The variable $regenerate will be used to restore data in libraries/tbl_properties.inc.php
$num_fields = $_REQUEST['orig_num_fields'];
$regenerate = true;
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.
// to prevent total loss of that data, we embed the form once again.
// The variable $regenerate will be used to restore data in libraries/tbl_properties.inc.php
$num_fields = $_REQUEST['orig_num_fields'];
$regenerate = true;
}
}
} // end do create table