diff options
Diffstat (limited to 'src/cgi-bin')
-rw-r--r-- | src/cgi-bin/dict.scm4 | 9 | ||||
-rw-r--r-- | src/cgi-bin/nea.scm4 | 8 |
2 files changed, 7 insertions, 10 deletions
diff --git a/src/cgi-bin/dict.scm4 b/src/cgi-bin/dict.scm4 index c9f895b..4d301fb 100644 --- a/src/cgi-bin/dict.scm4 +++ b/src/cgi-bin/dict.scm4 @@ -1,5 +1,5 @@ ;;;; Greek Dictionary Web Engine -;;;; Copyright (C) 2004, 2005, 2006, 2007 Sergey Poznyakoff +;;;; Copyright (C) 2004, 2005, 2006, 2007, 2010 Sergey Poznyakoff ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by @@ -51,14 +51,13 @@ ifelse(IFACE,[CGI],(cgi:init)) (if (not db-connection) (begin (set! db-connection - (sql-connect - sql-iface sql-host sql-port sql-database - sql-username sql-password)) + (sql-open-connection + ellinika-sql-connection)) (sql-query db-connection "SET NAMES utf8") ))) (else (if db-connection - (sql-connect-close db-connection)) + (sql-close-connection db-connection)) (set! db-connection #f))) db-connection))) diff --git a/src/cgi-bin/nea.scm4 b/src/cgi-bin/nea.scm4 index e490a59..b5a9af0 100644 --- a/src/cgi-bin/nea.scm4 +++ b/src/cgi-bin/nea.scm4 @@ -1,5 +1,5 @@ ;;;; News page for Ellinika -;;;; Copyright (C) 2004, 2005, 2006, 2007 Sergey Poznyakoff +;;;; Copyright (C) 2004, 2005, 2006, 2007, 2010 Sergey Poznyakoff ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by @@ -380,9 +380,7 @@ ifelse(IFACE,[CGI],(cgi:init)) </rss>")) (define (nea-sql-connect) - (let ((conn (sql-connect - sql-iface sql-host sql-port sql-database - sql-username sql-password))) + (let ((conn (sql-open-connection ellinika-sql-connection))) (sql-query conn "SET NAMES utf8") conn)) @@ -507,7 +505,7 @@ ifelse(IFACE,[CGI],(cgi:init)) (template-file target-language tmpl) nea-html) - (sql-connect-close conn)) + (sql-close-connection conn)) (lambda (key err descr) (with-input-from-file |