Added comparison check where DSN eq site's DSN then just reuse the connection.
This commit is contained in:
parent
004765e088
commit
f1a1a73fa7
1 changed files with 3 additions and 1 deletions
|
|
@ -108,7 +108,9 @@ sub www_view {
|
|||
$output = $_[0]->displayTitle;
|
||||
$output .= $_[0]->description;
|
||||
$output .= WebGUI::International::get(17,$namespace)." ".$query."<p>" if ($_[0]->get("debugMode"));
|
||||
if ($dsn =~ /\DBI\:\w+\:\w+/) {
|
||||
if ($dsn eq $session{config}{dsn}) {
|
||||
$dbh = $session{dbh};
|
||||
} elsif ($dsn =~ /\DBI\:\w+\:\w+/) {
|
||||
eval{$dbh = DBI->connect($dsn,$_[0]->get("username"),$_[0]->get("identifier"))};
|
||||
if ($@) {
|
||||
WebGUI::ErrorHandler::warn("SQL Report [".$_[0]->get("wobjectId")."] ".$@);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue