]> lifelog.hopto.org Git - LifeLog.git/commitdiff
Fix:dbname was not set properly.
authorWill Budicm <redacted>
Mon, 21 Dec 2020 09:23:33 +0000 (20:23 +1100)
committerWill Budicm <redacted>
Mon, 21 Dec 2020 09:23:33 +0000 (20:23 +1100)
htdocs/cgi-bin/system/modules/Settings.pm

index 08e5a41ce32009b588887d08a38062d1bafad4fc..ab9128f71af3d8deb72bb518708152a3b1bf1232 100644 (file)
@@ -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=>"<p>Error->$@</p>",  show_trace=>1);
+       LifeLogException->throw(error=>"<p>Error->$@</p><br><p>$DSN</p>",  show_trace=>1);
     }
 }