mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Used to notify when a build has been deleted (deletes corresponding build_fields from the DB)
This commit is contained in:
parent
e99d878a12
commit
786726c527
36
webtools/tinderbox3/scripts/xml/build_deleted.pl
Executable file
36
webtools/tinderbox3/scripts/xml/build_deleted.pl
Executable file
@ -0,0 +1,36 @@
|
||||
#!/usr/bin/perl -wT -I..
|
||||
|
||||
use strict;
|
||||
use CGI;
|
||||
use Tinderbox3::DB;
|
||||
use Tinderbox3::XML;
|
||||
use Tinderbox3::Log;
|
||||
|
||||
|
||||
our $p = new CGI();
|
||||
our $dbh = get_dbh();
|
||||
|
||||
$SIG{__DIE__} = sub { die_xml_error($p, $dbh, $_[0]); };
|
||||
|
||||
my $url = $p->param('url') || "";
|
||||
if (!$url) {
|
||||
die_xml_error($p, $dbh, "Must specify url!");
|
||||
}
|
||||
|
||||
my $rows = $dbh->do("DELETE FROM tbox_build_field WHERE name = ? AND value = ?", undef, "build_zip", $url);
|
||||
$dbh->commit;
|
||||
|
||||
if ($rows eq "0E0") {
|
||||
die_xml_error($p, $dbh, "No rows deleted!");
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Print response
|
||||
#
|
||||
print $p->header("text/xml");
|
||||
print "<response>\n";
|
||||
print "<builds_deleted rows='$rows'/>\n";
|
||||
print "</response>\n";
|
||||
|
||||
$dbh->disconnect;
|
36
webtools/tinderbox3/server/xml/build_deleted.pl
Executable file
36
webtools/tinderbox3/server/xml/build_deleted.pl
Executable file
@ -0,0 +1,36 @@
|
||||
#!/usr/bin/perl -wT -I..
|
||||
|
||||
use strict;
|
||||
use CGI;
|
||||
use Tinderbox3::DB;
|
||||
use Tinderbox3::XML;
|
||||
use Tinderbox3::Log;
|
||||
|
||||
|
||||
our $p = new CGI();
|
||||
our $dbh = get_dbh();
|
||||
|
||||
$SIG{__DIE__} = sub { die_xml_error($p, $dbh, $_[0]); };
|
||||
|
||||
my $url = $p->param('url') || "";
|
||||
if (!$url) {
|
||||
die_xml_error($p, $dbh, "Must specify url!");
|
||||
}
|
||||
|
||||
my $rows = $dbh->do("DELETE FROM tbox_build_field WHERE name = ? AND value = ?", undef, "build_zip", $url);
|
||||
$dbh->commit;
|
||||
|
||||
if ($rows eq "0E0") {
|
||||
die_xml_error($p, $dbh, "No rows deleted!");
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Print response
|
||||
#
|
||||
print $p->header("text/xml");
|
||||
print "<response>\n";
|
||||
print "<builds_deleted rows='$rows'/>\n";
|
||||
print "</response>\n";
|
||||
|
||||
$dbh->disconnect;
|
Loading…
Reference in New Issue
Block a user