From: Will Budicm Date: Mon, 21 Dec 2020 09:23:33 +0000 (+1100) Subject: Fix:dbname was not set properly. X-Git-Url: https://lifelog.hopto.org/gitweb/?a=commitdiff_plain;h=ff2e54fffd695b8abc3454fbc04834188068fe9f;p=LifeLog.git Fix:dbname was not set properly. --- diff --git a/htdocs/cgi-bin/system/modules/Settings.pm b/htdocs/cgi-bin/system/modules/Settings.pm index 08e5a41..ab9128f 100644 --- a/htdocs/cgi-bin/system/modules/Settings.pm +++ b/htdocs/cgi-bin/system/modules/Settings.pm @@ -614,7 +614,7 @@ sub connectDB { $u = $alias if(!$u); $p = $alias if(!$p); my $db =$u; - if(!$d){$db = 'data_'.$u.'_log.db';} + if(!$d){$db = 'data_'.$u.'_log.db';$d=$u} else{ $db = 'data_'.$d.'_log.db';} $DBFILE = $LOG_PATH.'/'.$db; if ($IS_PG_DB) { @@ -625,7 +625,7 @@ sub connectDB { try{ return DBI->connect($DSN, $u, $p, {AutoCommit => 1, RaiseError => 1, PrintError => 0, show_trace=>1}); }catch{ - LifeLogException->throw(error=>"

Error->$@

", show_trace=>1); + LifeLogException->throw(error=>"

Error->$@


$DSN

", show_trace=>1); } }