sub PutTrailer (@)
{
my (@links) = ("Back to the <A HREF=\"query.cgi\">query page</A>", @_);
+ SendSQL("UNLOCK TABLES");
my $count = $#links;
my $num = 0;
SendSQL("DELETE FROM components
WHERE id=$component_id");
print "Components deleted.<P>\n";
- SendSQL("UNLOCK TABLES");
unlink "$datadir/versioncache";
PutTrailer($localtrailer);
unless ($description) {
print "Sorry, I can't delete the description.";
PutTrailer($localtrailer);
- SendSQL("UNLOCK TABLES");
exit;
}
SendSQL("UPDATE components
if ($initialowner ne $initialownerold) {
unless ($initialowner) {
print "Sorry, I can't delete the initial owner.";
- SendSQL("UNLOCK TABLES");
PutTrailer($localtrailer);
exit;
}
my $initialownerid = DBname_to_id($initialowner);
unless ($initialownerid) {
print "Sorry, you must use an existing Bugzilla account as initial owner.";
- SendSQL("UNLOCK TABLES");
PutTrailer($localtrailer);
exit;
}
my $initialqacontactid = DBname_to_id($initialqacontact);
if (!$initialqacontactid && $initialqacontact ne '') {
print "Sorry, you must use an existing Bugzilla account as initial QA contact.";
- SendSQL("UNLOCK TABLES");
PutTrailer($localtrailer);
exit;
}
unless ($component) {
print "Sorry, but a component must have a name.";
PutTrailer($localtrailer);
- SendSQL("UNLOCK TABLES");
exit;
}
if (TestComponent($product,$component)) {
print "Sorry, component name '$component' is already in use.";
PutTrailer($localtrailer);
- SendSQL("UNLOCK TABLES");
exit;
}
unlink "$datadir/versioncache";
print "Updated component name.<BR>\n";
}
- SendSQL("UNLOCK TABLES");
PutTrailer($localtrailer);
exit;
sub PutTrailer (@)
{
my (@links) = ("Back to the <a href=\"./\">index</a>", @_);
+ SendSQL("UNLOCK TABLES");
my $count = $#links;
my $num = 0;
SET last_changed = NOW()
WHERE id = ?");
$sth->execute($gid);
- $dbh->do("UNLOCK TABLES");
PutTrailer("back to the <a href=\"editgroups.cgi\">group list</a>");
exit;
}
sub PutTrailer (@)
{
my (@links) = ("Back to the <A HREF=\"query.cgi\">query page</A>", @_);
+ SendSQL("UNLOCK TABLES");
my $count = $#links;
my $num = 0;
WHERE product_id=$product_id
AND value=" . SqlQuote($milestone));
print "Milestone deleted.<P>\n";
- SendSQL("UNLOCK TABLES");
unlink "$datadir/versioncache";
PutTrailer($localtrailer);
unless ($milestone) {
print "Sorry, I can't delete the milestone text.";
PutTrailer($localtrailer);
- SendSQL("UNLOCK TABLES");
exit;
}
if (TestMilestone($product,$milestone)) {
print "Sorry, milestone '$milestone' is already in use.";
PutTrailer($localtrailer);
- SendSQL("UNLOCK TABLES");
exit;
}
SendSQL("UPDATE bugs
unlink "$datadir/versioncache";
print "Updated milestone.<BR>\n";
}
- SendSQL("UNLOCK TABLES");
PutTrailer($localtrailer);
exit;
sub PutTrailer (@)
{
my (@links) = ("Back to the <A HREF=\"query.cgi\">query page</A>", @_);
+ SendSQL("UNLOCK TABLES");
my $count = $#links;
my $num = 0;
WHERE id=$product_id");
print "Product '$product' deleted.<BR>\n";
- SendSQL("UNLOCK TABLES");
-
unlink "$datadir/versioncache";
PutTrailer($localtrailer);
exit;
}
print "added $count bugs<p>\n";
}
- SendSQL("UNLOCK TABLES");
print "Group control updates done<P>\n";
PutTrailer($localtrailer);
if ($description ne $descriptionold) {
unless ($description) {
print "Sorry, I can't delete the description.";
- SendSQL("UNLOCK TABLES");
PutTrailer($localtrailer);
exit;
}
" AND product_id = $product_id");
if (!FetchOneColumn()) {
print "Sorry, the milestone $defaultmilestone must be defined first.";
- SendSQL("UNLOCK TABLES");
PutTrailer($localtrailer);
exit;
}
if ($product ne $productold) {
unless ($product) {
print "Sorry, I can't delete the product name.";
- SendSQL("UNLOCK TABLES");
PutTrailer($localtrailer);
exit;
}
if (TestProduct($product)) {
print "Sorry, product name '$product' is already in use.";
- SendSQL("UNLOCK TABLES");
PutTrailer($localtrailer);
exit;
}
sub PutTrailer (@)
{
my (@links) = ("Back to the <a href=\"./\">index</a>");
+ SendSQL("UNLOCK TABLES");
+
if($editall && Bugzilla::Auth->can_edit) {
push(@links,
"<a href=\"editusers.cgi?action=add\">add</a> a new user");
sub PutTrailer (@)
{
my (@links) = ("Back to the <A HREF=\"query.cgi\">query page</A>", @_);
+ SendSQL("UNLOCK TABLES");
my $count = $#links;
my $num = 0;
WHERE product_id = $product_id
AND value=" . SqlQuote($version));
print "Version deleted.<P>\n";
- SendSQL("UNLOCK TABLES");
unlink "$datadir/versioncache";
PutTrailer($localtrailer);
unless ($version) {
print "Sorry, I can't delete the version text.";
PutTrailer($localtrailer);
- SendSQL("UNLOCK TABLES");
exit;
}
if (TestVersion($product,$version)) {
print "Sorry, version '$version' is already in use.";
PutTrailer($localtrailer);
- SendSQL("UNLOCK TABLES");
exit;
}
SendSQL("UPDATE bugs
unlink "$datadir/versioncache";
print "Updated version.<BR>\n";
}
- SendSQL("UNLOCK TABLES");
PutTrailer($localtrailer);
exit;