summaryrefslogtreecommitdiffabout
path: root/src/cgi-bin/dict.scm4
Side-by-side diff
Diffstat (limited to 'src/cgi-bin/dict.scm4') (more/less context) (ignore whitespace changes)
-rw-r--r--src/cgi-bin/dict.scm428
1 files changed, 15 insertions, 13 deletions
diff --git a/src/cgi-bin/dict.scm4 b/src/cgi-bin/dict.scm4
index 77c1b3a..3b24367 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, 2010, 2011 Sergey Poznyakoff
+;;;; Copyright (C) 2004, 2005, 2006, 2007, 2010, 2011, 2015 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
@@ -18,10 +18,13 @@
;;; Tailor this statement to your needs if necessary.
(set! %load-path (cons "GUILE_SITE" %load-path))
+(setlocale LC_ALL "")
+
(use-modules ifelse(IFACE,[CGI],(www cgi),(guile-user))
(ice-9 rdelim)
(xmltools dict)
(gamma sql)
+ (gamma syslog)
(ellinika elmorph)
(ellinika sql)
(ellinika i18n)
@@ -79,7 +82,7 @@ ifelse(IFACE,[CGI],(cgi:init))
(define (join-widget widget-id tabindex)
(let* ((name (string-append "join" widget-id))
- (selected-choice (or (let ((s (cgi:value name)))
+ (selected-choice (or (let ((s (cgi:value-u8 name)))
(if s
(string->number s)
#f))
@@ -112,7 +115,7 @@ ifelse(IFACE,[CGI],(cgi:init))
</td>
<td>
<input size=\"36\" name=\"key\" tabindex=\"1\"")
- (let ((value (cgi:value "key")))
+ (let ((value (cgi:value-u8 "key")))
(if value
(begin
(display " value=\"")
@@ -132,7 +135,7 @@ ifelse(IFACE,[CGI],(cgi:init))
(display (_"Επιλέξτε το μέρος του λόγου"))
(display "</td><td>")
- (let ((selected-choice (or (let ((s (cgi:value "pos")))
+ (let ((selected-choice (or (let ((s (cgi:value-u8 "pos")))
(if s
(string->number s)
#f))
@@ -166,7 +169,7 @@ ifelse(IFACE,[CGI],(cgi:init))
(display "<tr><td>")
(display (list-ref category 1))
(display "</td><td>")
- (let ((selected-choice (or (let ((s (cgi:value (list-ref category 0))))
+ (let ((selected-choice (or (let ((s (cgi:value-u8 (list-ref category 0))))
(if s
(string->number s)
#f))
@@ -353,7 +356,7 @@ ifelse(IFACE,[CGI],(cgi:init))
(list-ref part-of-speech (string->number pos))))
(if (or (not (string-null? key)) (not (null? theme)))
(set! where-cond (cons
- (if (string=? (cgi:value "joinpos") "0")
+ (if (string=? (cgi:value-u8 "joinpos") "0")
" AND"
" OR")
where-cond)))
@@ -418,21 +421,20 @@ ifelse(IFACE,[CGI],(cgi:init))
(define (dict-search)
- (let ((keyval (if (cgi:value "ident")
- (dict:decode-string (cgi:value "ident"))
- (cgi:value "key")))
+ (let ((keyval (or (cgi:value-u8 "ident")
+ (cgi:value-u8 "key")))
(theme (do ((catlist (get-topic-list) (cdr catlist))
(ret '()))
((null? catlist) ret)
(let ((name (caar catlist)))
- (let ((v (cgi:value name)))
+ (let ((v (cgi:value-u8 name)))
(if (and v (> (string->number v) 0))
(set! ret (append
ret
(list (= (string->number
- (cgi:value (string-append "join" name))) 0)
+ (cgi:value-u8 (string-append "join" name))) 0)
v))))))))
- (pos (or (cgi:value "pos") "0")))
+ (pos (or (cgi:value-u8 "pos") "0")))
(sql-catch-failure
(cond
@@ -521,7 +523,7 @@ dict.forms,articles.subindex,articles.meaning,(dict.pos & conv(\"100000\",16,10)
(cond
((string=? name "lang"))
(else
- (let ((v (cgi:value name)))
+ (let ((v (cgi:value-u8 name)))
(cond ((and v (not (string-null? v)))
(display "&amp;")
(display name)

Return to:

Send suggestions and report system problems to the System administrator.