Get a patch in plain text

git-svn-id: svn://10.0.0.236/trunk@137296 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
johnkeis
2003-02-03 03:38:14 +00:00
parent bd227a4680
commit 683da1ba74
2 changed files with 54 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
#!/usr/bin/perl -wT -I.
use CGI;
use Tinderbox3::DB;
use Tinderbox3::XML;
my $p = new CGI();
my $dbh = get_dbh();
my $patch_id = $p->param('patch_id') || "";
if (!$patch_id) {
die_xml_error($p, $dbh, "Must specify patch id!");
}
#
# Get data for response
#
my $patch = $dbh->selectrow_arrayref("SELECT patch FROM tbox_patch WHERE patch_id = ?", undef, $patch_id);
if (!defined($patch)) {
die_xml_error($p, $dbh, "Could not get tree!");
}
print $p->header("text/plain");
print $patch->[0];
$dbh->disconnect;

View File

@@ -0,0 +1,27 @@
#!/usr/bin/perl -wT -I.
use CGI;
use Tinderbox3::DB;
use Tinderbox3::XML;
my $p = new CGI();
my $dbh = get_dbh();
my $patch_id = $p->param('patch_id') || "";
if (!$patch_id) {
die_xml_error($p, $dbh, "Must specify patch id!");
}
#
# Get data for response
#
my $patch = $dbh->selectrow_arrayref("SELECT patch FROM tbox_patch WHERE patch_id = ?", undef, $patch_id);
if (!defined($patch)) {
die_xml_error($p, $dbh, "Could not get tree!");
}
print $p->header("text/plain");
print $patch->[0];
$dbh->disconnect;