mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 18:14:07 +02:00
Pass $error as param
This commit is contained in:
@@ -110,4 +110,4 @@ if (!support("table") && !$fields) { // used by Mongo and SimpleDB
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
edit_form($TABLE, $fields, $row, $update);
|
edit_form($TABLE, $fields, $row, $update, $error);
|
||||||
|
@@ -363,8 +363,8 @@ function on_help(string $command, int $side = 0): string {
|
|||||||
* @param Field[] $fields
|
* @param Field[] $fields
|
||||||
* @param mixed $row
|
* @param mixed $row
|
||||||
*/
|
*/
|
||||||
function edit_form(string $table, array $fields, $row, ?bool $update): void {
|
function edit_form(string $table, array $fields, $row, ?bool $update, string $error = ''): void {
|
||||||
global $adminer, $error;
|
global $adminer;
|
||||||
$table_name = $adminer->tableName(table_status1($table, true));
|
$table_name = $adminer->tableName(table_status1($table, true));
|
||||||
page_header(
|
page_header(
|
||||||
($update ? lang('Edit') : lang('Insert')),
|
($update ? lang('Edit') : lang('Insert')),
|
||||||
|
@@ -159,7 +159,7 @@ if ($_POST && !$error) {
|
|||||||
queries_redirect(remove_from_uri($_POST["all"] && $_POST["delete"] ? "page" : ""), $message, $result);
|
queries_redirect(remove_from_uri($_POST["all"] && $_POST["delete"] ? "page" : ""), $message, $result);
|
||||||
if (!$_POST["delete"]) {
|
if (!$_POST["delete"]) {
|
||||||
$post_fields = (array) $_POST["fields"];
|
$post_fields = (array) $_POST["fields"];
|
||||||
edit_form($TABLE, array_intersect_key($fields, $post_fields), $post_fields, !$_POST["clone"]);
|
edit_form($TABLE, array_intersect_key($fields, $post_fields), $post_fields, !$_POST["clone"], $error);
|
||||||
page_footer();
|
page_footer();
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user