From 9f69d7ae934f3231e870ffe191b179631071695e Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 28 Nov 2010 16:35:34 +0100 Subject: [PATCH] MS SQL: Do not update AI value --- adminer/include/functions.inc.php | 6 +++++- todo.txt | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index 2e18be37..86206a50 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -618,7 +618,11 @@ function input($field, $value, $function) { global $types, $adminer, $jush; $name = h(bracket_escape($field["field"])); echo ""; - $functions = (isset($_GET["select"]) ? array("orig" => lang('original')) : array()) + $adminer->editFunctions($field); + $reset = ($jush == "mssql" && $field["auto_increment"]); + if ($reset && !$_POST["save"]) { + $function = null; + } + $functions = (isset($_GET["select"]) || $reset ? array("orig" => lang('original')) : array()) + $adminer->editFunctions($field); $attrs = " name='fields[$name]'"; if ($field["type"] == "enum") { echo nbsp($functions[""]) . "" . $adminer->editInput($_GET["edit"], $field, $attrs, $value); diff --git a/todo.txt b/todo.txt index b5d554fe..46ad70bc 100644 --- a/todo.txt +++ b/todo.txt @@ -42,7 +42,6 @@ Column rights - http://www.postgresql.org/docs/8.4/static/functions-info.html bool in Editor MS SQL: -Edit of AI column Non UTF-8 character sets Detection of table collation PDO_MSSQL and PDO_SQLSRV driver with seek