diff -r 86504771a173 -r 1898ce7c3fd3 log.pl --- a/log.pl Fri Apr 28 09:28:28 2017 +0200 +++ b/log.pl Thu Oct 12 12:32:14 2017 +0200 @@ -56,9 +56,9 @@ my $ME = basename $0; -my $DSN = "DBI:mysql:logbuch:pu.schlittermann.de"; -my $USER = "logbuch"; -my $PW = "HIDDEN"; +my $DSN = $config::dbDSN; +my $USER = $config::dbUser; +my $PW = $config::dbPass; my $EDITOR = $ENV{VISUAL} || $ENV{EDITOR} || "vim"; my $MAGIC = "#--- all changes below are ignored ---#\n"; @@ -252,7 +252,7 @@ if ($opt_db and $Dbh) { my $sth = $Dbh->prepare(" - INSERT INTO log (host, date, user, mailto, text) + INSERT INTO log (host, date, \"user\", mailto, text) VALUES(?, now(), ?, ?, ?)"); $sth->execute(full_hostname(), $user, $mailto, $text); print STDERR "Database entry inserted\n";