Fixes from the 5.2.5 bugfix cycle.

This commit is contained in:
JT Smith 2003-04-18 22:30:57 +00:00
parent 6949f42a2c
commit afbcfc7d56
17 changed files with 2422 additions and 36 deletions

View file

@ -20,8 +20,10 @@ sub process {
my ($output, @data, $rownum, $temp);
my ($statement, $format) = WebGUI::Macro::getParams(shift);
$format = '^0;' if ($format eq "");
my $result = eval {
my $sth = WebGUI::SQL->new($statement,$session{dbh});
my $sth = WebGUI::SQL->unconditionalRead($statement);
unless ($sth->errorCode < 1) {
return '<p><b>SQL Macro Failed:</b> '.$sth->errorMessage.'<p>';
} else {
while (@data = $sth->array) {
$temp = $format;
$temp =~ s/\^(\d+)\;/$data[$1]/g;
@ -30,10 +32,6 @@ sub process {
$output .= $temp;
}
$sth->finish;
};
if ($@) {
return '<p><b>SQL Macro Failed:</b> '.$@.'<p>';
} else {
return $output;
}
}