fix: SQLReport now throws fatal if can't find DatabaseLink

DatabaseLink now warns if can't find DatabaseLink
This commit is contained in:
Doug Bell 2006-10-27 20:42:59 +00:00
parent 4ed1ffe3c7
commit 50e7645322
3 changed files with 16 additions and 6 deletions

View file

@ -566,7 +566,8 @@ sub _processQuery {
my $i18n = WebGUI::International->new($self->session,"Asset_SQLReport");
push(@{$self->{_debug_loop}},{'debug.output'=>$i18n->get(17).$query});
push(@{$self->{_debug_loop}},{'debug.output'=>$i18n->get('debug placeholder parameters').join(",",@$placeholderParams)});
my $dbLink = WebGUI::DatabaseLink->new($self->session,$self->{_query}{$nr}{databaseLinkId});
my $dbLink = WebGUI::DatabaseLink->new($self->session,$self->{_query}{$nr}{databaseLinkId})
|| return $self->session->errorHandler->error("Could not find database link '".$self->{_query}{$nr}{databaseLinkId}."'. Has it been created?");
my $dbh = $dbLink->db;
if (defined $dbh) {