From: justdave%syndicomm.com <>
Date: Fri, 6 Apr 2001 23:47:49 +0000 (+0000)
Subject: Fix for bug 74394: editmilestones.cgi can't edit the name and sortkey at the same...
X-Git-Tag: bugzilla-2.12~32
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15bbeca6392a314269ec3aadb1a949e65fc53fe4;p=thirdparty%2Fbugzilla.git
Fix for bug 74394: editmilestones.cgi can't edit the name and sortkey at the same time
Patch by slee@uk.bnsmc.com (Stephen Lee)
---
diff --git a/editmilestones.cgi b/editmilestones.cgi
index 9eadeeba2d..57fe78830d 100755
--- a/editmilestones.cgi
+++ b/editmilestones.cgi
@@ -513,6 +513,13 @@ if ($action eq 'update') {
milestones WRITE,
products WRITE");
+ if ($sortkey != $sortkeyold) {
+ SendSQL("UPDATE milestones SET sortkey=$sortkey
+ WHERE product=" . SqlQuote($product) . "
+ AND value=" . SqlQuote($milestoneold));
+ unlink "data/versioncache";
+ print "Updated sortkey.
\n";
+ }
if ($milestone ne $milestoneold) {
unless ($milestone) {
print "Sorry, I can't delete the milestone text.";
@@ -541,13 +548,6 @@ if ($action eq 'update') {
unlink "data/versioncache";
print "Updated milestone.
\n";
}
- if ($sortkey != $sortkeyold) {
- SendSQL("UPDATE milestones SET sortkey=$sortkey
- WHERE product=" . SqlQuote($product) . "
- AND value=" . SqlQuote($milestoneold));
- unlink "data/versioncache";
- print "Updated sortkey.
\n";
- }
SendSQL("UNLOCK TABLES");
PutTrailer($localtrailer);