Permalink
Browse files

MS SQL: Do not update AI value

  • Loading branch information...
1 parent 4a2fe5e commit 9f69d7ae934f3231e870ffe191b179631071695e @vrana committed Nov 28, 2010
Showing with 5 additions and 2 deletions.
  1. +5 −1 adminer/include/functions.inc.php
  2. +0 −1 todo.txt
View
6 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 "<td class='function'>";
- $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[""]) . "<td>" . $adminer->editInput($_GET["edit"], $field, $attrs, $value);
View
1 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

0 comments on commit 9f69d7a

Please sign in to comment.