1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 15:47:00 +02:00

Add callback before edit form (bug #759)

This commit is contained in:
Jakub Vrana
2021-02-08 09:23:57 +01:00
parent 2dd3bd0e1a
commit a8c218f192
4 changed files with 21 additions and 4 deletions

View File

@@ -1411,15 +1411,16 @@ function on_help($command, $side = 0) {
* @param bool
* @return null
*/
function edit_form($TABLE, $fields, $row, $update) {
function edit_form($table, $fields, $row, $update) {
global $adminer, $jush, $token, $error;
$table_name = $adminer->tableName(table_status1($TABLE, true));
$table_name = $adminer->tableName(table_status1($table, true));
page_header(
($update ? lang('Edit') : lang('Insert')),
$error,
array("select" => array($TABLE, $table_name)),
array("select" => array($table, $table_name)),
$table_name
);
$adminer->editRowPrint($table, $fields, $row, $update);
if ($row === false) {
echo "<p class='error'>" . lang('No rows.') . "\n";
}