]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 256004: Fix regression that caused duplicate sortkeys in the fielddefs table
authorjustdave%bugzilla.org <>
Wed, 15 Sep 2004 07:59:18 +0000 (07:59 +0000)
committerjustdave%bugzilla.org <>
Wed, 15 Sep 2004 07:59:18 +0000 (07:59 +0000)
r=myk, a=justdave

checksetup.pl

index a1a4ab11a3126ec19647c11acbf0ca5af08de313..06bc04a4f0c09a9bb1559b83998c7e6f99c2ebf0 100755 (executable)
@@ -2088,11 +2088,11 @@ sub AddFDef ($$$) {
         $dbh->do("INSERT INTO fielddefs " .
              "(fieldid, name, description, mailhead, sortkey) VALUES " .
              "($fieldid, $name, $description, $mailhead, $headernum)");
-        $headernum++;
     } else {
         $dbh->do("UPDATE fielddefs SET name = $name, description = $description, " .
-                 "mailhead = $mailhead WHERE fieldid = $fieldid");
+                 "mailhead = $mailhead, sortkey = $headernum WHERE fieldid = $fieldid");
     }
+    $headernum++;
 }