aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cgi-bin/dict.cgi.in23
1 files changed, 16 insertions, 7 deletions
diff --git a/cgi-bin/dict.cgi.in b/cgi-bin/dict.cgi.in
index 69d6bb2..29fe286 100644
--- a/cgi-bin/dict.cgi.in
+++ b/cgi-bin/dict.cgi.in
@@ -375,9 +375,12 @@
'())))
(define (fuzzy-search conn key theme pos)
- (let ((where-cond (list "WHERE"))
+ (let ((where-cond (list (string-append
+ "WHERE dict.ident=articles.ident and articles.lang='"
+ (language-code target-language)
+ "' AND")))
(select-stmt "SELECT DISTINCT dict.word FROM ")
- (from-list (list "dict")))
+ (from-list (list ",articles" "dict")))
(cond
((not (null? theme))
@@ -494,9 +497,12 @@
(result (my-sql-query
conn
(string-append
- "SELECT dict.word,dict.ident,pos.abbr,dict.forms,articles.subindex,articles.meaning FROM dict,articles,pos WHERE dict.word=\""
+ "SELECT dict.word,dict.ident,pos.abbr,dict.forms,articles.subindex,articles.meaning "
+ "FROM dict,articles,pos WHERE dict.word=\""
key
- "\" and dict.ident=articles.ident and dict.pos=pos.id and pos.canonical='Y' order by dict.ident, articles.subindex"))))
+ "\" AND dict.ident=articles.ident "
+ "AND articles.lang='" (language-code target-language) "' "
+ "AND dict.pos=pos.id AND pos.canonical='Y' order by dict.ident, articles.subindex"))))
(cond
((null? result)
@@ -514,7 +520,7 @@
(if (and ant (not (null? ant)))
(display-xref ant
(if (= (length ant) 1)
- (_"Антоним: ") (_"Антонимы: ")))))
+ (_"Αντώνυμο: ") (_"Αντώνυμα: ")))))
(display "<P>")
(let ((x (my-sql-query
conn
@@ -523,7 +529,7 @@
(cadr (car entry))
" AND dict.ident=links.xref ORDER BY word"))))
(if (and x (not (null? x)))
- (display-xref x (_"См. также ")))))
+ (display-xref x (_"Βλέπετε επίσης ")))))
(sort-result result))))))
((or (not (null? theme)) (> (string->number pos) 0))
(display "<HR>")
@@ -539,7 +545,10 @@
(or
(ignore-sql-failure
(my-sql-query (dict-connect)
- "SELECT count,updated from stat"))
+ (string-append
+ "SELECT count,updated from stat WHERE lang='"
+ (language-code target-language)
+ "'")))
'())))
(if (null? stat-data)

Return to:

Send suggestions and report system problems to the System administrator.