aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-06-16 22:01:59 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2011-06-16 23:37:03 +0300
commit79998f1e7772ba1040154c7ba79dc382e23c6302 (patch)
treeb24997235eff88b248bf4156ac77bfda75251bb5
parent393fc19572aee23f558f36beedec1a3ee2c89cc2 (diff)
downloadellinika-79998f1e7772ba1040154c7ba79dc382e23c6302.tar.gz
ellinika-79998f1e7772ba1040154c7ba79dc382e23c6302.tar.bz2
Various improvements.
* src/cgi-bin/conj.scm4: Expect argument names in lower case. * src/cgi-bin/dict.scm4: Likewise. * src/cgi-bin/nea.scm4: Likewise. * src/ellinika/cgi.scm4: Likewise. * xml/lingua.conf.in: Pass lang argument to CGIs in lower case. * xml/pl/ellinika.xml: Add PREREQ LINGUA attribute. * xml/ru/ellinika.xml: Likewise. * xml/uk/ellinika.xml: Likewise. * .htaccess: Downcase CGI argument names.
-rw-r--r--src/cgi-bin/conj.scm42
-rw-r--r--src/cgi-bin/dict.scm414
-rw-r--r--src/cgi-bin/nea.scm42
-rw-r--r--src/ellinika/cgi.scm46
-rw-r--r--xml/lingua.conf.in4
-rw-r--r--xml/pl/ellinika.xml4
-rw-r--r--xml/ru/ellinika.xml4
-rw-r--r--xml/uk/ellinika.xml4
8 files changed, 20 insertions, 20 deletions
diff --git a/src/cgi-bin/conj.scm4 b/src/cgi-bin/conj.scm4
index fcacaad..0c7b8f2 100644
--- a/src/cgi-bin/conj.scm4
+++ b/src/cgi-bin/conj.scm4
@@ -296,7 +296,7 @@ ifelse(IFACE,[CGI],(cgi:init))
296 (for-each 296 (for-each
297 (lambda (name) 297 (lambda (name)
298 (cond 298 (cond
299 ((string=? name "LANG")) 299 ((string=? name "lang"))
300 (else 300 (else
301 (let ((v (cgi:value name))) 301 (let ((v (cgi:value name)))
302 (cond ((and v (not (string-null? v))) 302 (cond ((and v (not (string-null? v)))
diff --git a/src/cgi-bin/dict.scm4 b/src/cgi-bin/dict.scm4
index c3429e9..de6b8c5 100644
--- a/src/cgi-bin/dict.scm4
+++ b/src/cgi-bin/dict.scm4
@@ -132,14 +132,14 @@ ifelse(IFACE,[CGI],(cgi:init))
132 (display (_"Επιλέξτε το μέρος του λόγου")) 132 (display (_"Επιλέξτε το μέρος του λόγου"))
133 (display "</td><td>") 133 (display "</td><td>")
134 134
135 (let ((selected-choice (or (let ((s (cgi:value "POS"))) 135 (let ((selected-choice (or (let ((s (cgi:value "pos")))
136 (if s 136 (if s
137 (string->number s) 137 (string->number s)
138 #f)) 138 #f))
139 0)) 139 0))
140 (index 0)) 140 (index 0))
141 141
142 (display "<select name=\"POS\" tabindex=\"2\">") 142 (display "<select name=\"pos\" tabindex=\"2\">")
143 143
144 (for-each 144 (for-each
145 (lambda (x) 145 (lambda (x)
@@ -275,7 +275,7 @@ ifelse(IFACE,[CGI],(cgi:init))
275 275
276(define (display-cross-reference word) 276(define (display-cross-reference word)
277 (display "<a href=\"") 277 (display "<a href=\"")
278 (display (make-cgi-name cgi-script-name "IDENT" (dict:encode-string word))) 278 (display (make-cgi-name cgi-script-name "ident" (dict:encode-string word)))
279 (display "\">") 279 (display "\">")
280 (display word) 280 (display word)
281 (display "</a>")) 281 (display "</a>"))
@@ -409,8 +409,8 @@ ifelse(IFACE,[CGI],(cgi:init))
409 409
410 410
411(define (dict-search) 411(define (dict-search)
412 (let ((keyval (if (cgi:value "IDENT") 412 (let ((keyval (if (cgi:value "ident")
413 (dict:decode-string (cgi:value "IDENT")) 413 (dict:decode-string (cgi:value "ident"))
414 (cgi:value "key"))) 414 (cgi:value "key")))
415 (theme (do ((catlist (get-topic-list) (cdr catlist)) 415 (theme (do ((catlist (get-topic-list) (cdr catlist))
416 (ret '())) 416 (ret '()))
@@ -423,7 +423,7 @@ ifelse(IFACE,[CGI],(cgi:init))
423 (list (= (string->number 423 (list (= (string->number
424 (cgi:value (string-append "join" name))) 0) 424 (cgi:value (string-append "join" name))) 0)
425 v)))))))) 425 v))))))))
426 (pos (or (cgi:value "POS") "0"))) 426 (pos (or (cgi:value "pos") "0")))
427 427
428 (sql-catch-failure 428 (sql-catch-failure
429 (cond 429 (cond
@@ -510,7 +510,7 @@ dict.forms,articles.subindex,articles.meaning\
510 (for-each 510 (for-each
511 (lambda (name) 511 (lambda (name)
512 (cond 512 (cond
513 ((string=? name "LANG")) 513 ((string=? name "lang"))
514 (else 514 (else
515 (let ((v (cgi:value name))) 515 (let ((v (cgi:value name)))
516 (cond ((and v (not (string-null? v))) 516 (cond ((and v (not (string-null? v)))
diff --git a/src/cgi-bin/nea.scm4 b/src/cgi-bin/nea.scm4
index 9c940f6..f64aca2 100644
--- a/src/cgi-bin/nea.scm4
+++ b/src/cgi-bin/nea.scm4
@@ -335,7 +335,7 @@ ifelse(IFACE,[CGI],(cgi:init))
335 (for-each 335 (for-each
336 (lambda (name) 336 (lambda (name)
337 (cond 337 (cond
338 ((string=? name "LANG")) 338 ((string=? name "lang"))
339 (else 339 (else
340 (let ((v (cgi:value name))) 340 (let ((v (cgi:value name)))
341 (cond ((and v (not (string-null? v))) 341 (cond ((and v (not (string-null? v)))
diff --git a/src/ellinika/cgi.scm4 b/src/ellinika/cgi.scm4
index 8cbfeca..d1b4a5c 100644
--- a/src/ellinika/cgi.scm4
+++ b/src/ellinika/cgi.scm4
@@ -92,9 +92,9 @@ ifelse(IFACE,[CGI],,dnl
92 string-append 92 string-append
93 (cons 93 (cons
94 cgi-path 94 cgi-path
95 (let ((arglist (let ((lang (cgi:value "LANG"))) 95 (let ((arglist (let ((lang (cgi:value "lang")))
96 (do ((ilist (if lang 96 (do ((ilist (if lang
97 (cons "LANG" (cons lang rest)) 97 (cons "lang" (cons lang rest))
98 rest) (cdr ilist)) 98 rest) (cdr ilist))
99 (i 1 (1+ i)) 99 (i 1 (1+ i))
100 (olist '())) 100 (olist '()))
@@ -156,7 +156,7 @@ THUNK.
156 156
157 ;;; Load the language-specific defaults 157 ;;; Load the language-specific defaults
158 (cond 158 (cond
159 ((cgi:value "LANG") => 159 ((cgi:value "lang") =>
160 (lambda (x) 160 (lambda (x)
161 (if (file-exists? (template-file x template-file-name)) 161 (if (file-exists? (template-file x template-file-name))
162 (set! target-language x))))) 162 (set! target-language x)))))
diff --git a/xml/lingua.conf.in b/xml/lingua.conf.in
index 3b86202..1e7ded3 100644
--- a/xml/lingua.conf.in
+++ b/xml/lingua.conf.in
@@ -39,7 +39,7 @@
39 (letrec ((nea (lambda (. args) 39 (letrec ((nea (lambda (. args)
40 (string-append 40 (string-append
41 (lingua:get-cgi-bin) 41 (lingua:get-cgi-bin)
42 "/nea.=SCRIPT_SUFFIX=?LANG=" 42 "/nea.=SCRIPT_SUFFIX=?lang="
43 (lingua:LANG args))))) 43 (lingua:LANG args)))))
44 (xmltrans:set-attr "LINGUA" "NEA" nea))) 44 (xmltrans:set-attr "LINGUA" "NEA" nea)))
45 45
@@ -49,7 +49,7 @@
49 (letrec ((conj (lambda (. args) 49 (letrec ((conj (lambda (. args)
50 (string-append 50 (string-append
51 (lingua:get-cgi-bin) 51 (lingua:get-cgi-bin)
52 "/conj.=SCRIPT_SUFFIX=?LANG=" 52 "/conj.=SCRIPT_SUFFIX=?lang="
53 (lingua:LANG args))))) 53 (lingua:LANG args)))))
54 (xmltrans:set-attr "LINGUA" "CONJ" conj))) 54 (xmltrans:set-attr "LINGUA" "CONJ" conj)))
55 55
diff --git a/xml/pl/ellinika.xml b/xml/pl/ellinika.xml
index f2d7f15..1c18a62 100644
--- a/xml/pl/ellinika.xml
+++ b/xml/pl/ellinika.xml
@@ -1,5 +1,5 @@
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Copyright (C) 2004, 2005, 2006, 2007, 2010 Sergey Poznyakoff 2<!-- Copyright (C) 2004-2011 Sergey Poznyakoff
3 3
4 Permission is granted to copy, distribute and/or modify this document 4 Permission is granted to copy, distribute and/or modify this document
5 under the terms of the GNU Free Documentation License, Version 1.2 5 under the terms of the GNU Free Documentation License, Version 1.2
@@ -8,7 +8,7 @@
8 Texts. A copy of the license is included in the file COPYING.FDL --> 8 Texts. A copy of the license is included in the file COPYING.FDL -->
9 9
10<!-- $Id$ --> 10<!-- $Id$ -->
11<LINGUA LANG="pl" TER="PL" PREFIX="ellinika" LINK="rss=/pl/nea.rss"> 11<LINGUA PREREQ="1.3 commit=147" LANG="pl" TER="PL" PREFIX="ellinika" LINK="rss=/pl/nea.rss">
12 12
13<AUTHOR CONTACT="Sergiusza Poznyakowa">Sergey Poznyakoff</AUTHOR> 13<AUTHOR CONTACT="Sergiusza Poznyakowa">Sergey Poznyakoff</AUTHOR>
14<KEYWORDS>grecki,gramatyka,słownik</KEYWORDS> 14<KEYWORDS>grecki,gramatyka,słownik</KEYWORDS>
diff --git a/xml/ru/ellinika.xml b/xml/ru/ellinika.xml
index 65abe4d..b0ef595 100644
--- a/xml/ru/ellinika.xml
+++ b/xml/ru/ellinika.xml
@@ -1,5 +1,5 @@
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Copyright (C) 2004, 2005, 2006, 2007, 2010 Sergey Poznyakoff 2<!-- Copyright (C) 2004-2011 Sergey Poznyakoff
3 3
4 Permission is granted to copy, distribute and/or modify this document 4 Permission is granted to copy, distribute and/or modify this document
5 under the terms of the GNU Free Documentation License, Version 1.2 5 under the terms of the GNU Free Documentation License, Version 1.2
@@ -8,7 +8,7 @@
8 Texts. A copy of the license is included in the file COPYING.FDL --> 8 Texts. A copy of the license is included in the file COPYING.FDL -->
9 9
10<!-- $Id$ --> 10<!-- $Id$ -->
11<LINGUA LANG="ru" TER="RU" PREFIX="ellinika" LINK="rss=/ru/nea.rss"> 11<LINGUA PREREQ="1.3 commit=147" LANG="ru" TER="RU" PREFIX="ellinika" LINK="rss=/ru/nea.rss">
12 12
13<AUTHOR CONTACT="Сергею Познякову">Sergey Poznyakoff</AUTHOR> 13<AUTHOR CONTACT="Сергею Познякову">Sergey Poznyakoff</AUTHOR>
14<KEYWORDS>греческий,грамматика,словарь</KEYWORDS> 14<KEYWORDS>греческий,грамматика,словарь</KEYWORDS>
diff --git a/xml/uk/ellinika.xml b/xml/uk/ellinika.xml
index 5cf32f7..12d8550 100644
--- a/xml/uk/ellinika.xml
+++ b/xml/uk/ellinika.xml
@@ -1,5 +1,5 @@
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Copyright (C) 2004, 2005, 2006, 2007, 2010 Sergey Poznyakoff 2<!-- Copyright (C) 2004-2011 Sergey Poznyakoff
3 3
4 Permission is granted to copy, distribute and/or modify this document 4 Permission is granted to copy, distribute and/or modify this document
5 under the terms of the GNU Free Documentation License, Version 1.2 5 under the terms of the GNU Free Documentation License, Version 1.2
@@ -8,7 +8,7 @@
8 Texts. A copy of the license is included in the file COPYING.FDL --> 8 Texts. A copy of the license is included in the file COPYING.FDL -->
9 9
10<!-- $Id$ --> 10<!-- $Id$ -->
11<LINGUA LANG="uk" TER="UA" PREFIX="ellinika" LINK="rss=/uk/nea.rss"> 11<LINGUA PREREQ="1.3 commit=147" LANG="uk" TER="UA" PREFIX="ellinika" LINK="rss=/uk/nea.rss">
12