]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 76157: Give proper error message on non-numeric sortkey when editing milestones.
authorjustdave%syndicomm.com <>
Fri, 26 Sep 2003 02:59:44 +0000 (02:59 +0000)
committerjustdave%syndicomm.com <>
Fri, 26 Sep 2003 02:59:44 +0000 (02:59 +0000)
Patch by jocuri@softhome.net (Vlad Dascalu)
r=kiko, a=justdave

editmilestones.cgi

index 504a36e7c6ffe3ac68098fc33ad45339170ccd4f..19582b4854f834df59f55bef6da3b1468039cff1 100755 (executable)
@@ -295,6 +295,12 @@ if ($action eq 'new') {
         PutTrailer($localtrailer);
         exit;
     }
+    if ($sortkey!~/^[0-9]+$/) {
+        print "The sortkey for a milestone must be a number. Please press\n";
+        print "<b>Back</b> and try again.\n";
+        PutTrailer($localtrailer);
+        exit;
+    }
     if (TestMilestone($product,$milestone)) {
         print "The milestone '$milestone' already exists. Please press\n";
         print "<b>Back</b> and try again.\n";