johnkeis 683da1ba74 Get a patch in plain text
git-svn-id: svn://10.0.0.236/trunk@137296 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-03 03:38:14 +00:00

28 lines
518 B
Perl
Executable File

#!/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;