diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-09-30 00:40:05 +0200 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-09-30 00:40:05 +0200 |
commit | 6392eaedc789a57cdddb123456ef1a0affb81713 (patch) | |
tree | a356d9b30c2c75948550b30dee227df1ac67615d | |
parent | 7f829dbfba7de43bbc2402b12ea476c63a2ef1f0 (diff) |
A few minor bug fixes.
darcs-hash:e8acb95333d31014bed6cba528ee5c92e9aa20ef
-rw-r--r-- | journal-content.lisp | 3 | ||||
-rwxr-xr-x | journal.lisp | 5 | ||||
-rw-r--r-- | main.lisp | 37 | ||||
-rwxr-xr-x | make-clisp-package.sh | 7 |
4 files changed, 29 insertions, 23 deletions
diff --git a/journal-content.lisp b/journal-content.lisp index 65a8a59..9140a51 100644 --- a/journal-content.lisp +++ b/journal-content.lisp @@ -77,8 +77,7 @@ :db-constraints :not-null :accessor id-of :initarg :id) - (entry-id :db-kind :key - :type integer + (entry-id :type integer :db-constraints :not-null :accessor id-of :initarg :entry-id) diff --git a/journal.lisp b/journal.lisp index efe753c..bc7bd2b 100755 --- a/journal.lisp +++ b/journal.lisp @@ -195,7 +195,10 @@ nicht beachtet werden. Sparen Sie sich also die Mühe.")) (<:form :action (link-to :view :post-id (id-of journal-entry)) :method "post" - :accept-charset "UTF-8" + :accept-charset #+(or) "ISO-10646-UTF-1" + "UTF-8" + :enctype #+(or) "multipart/form-data" + "application/x-www-form-urlencoded" (<:div :style "display: none" (<:input :type "hidden" :name "id" @@ -28,18 +28,14 @@ (*debugging-p* (eq *site* :mst-plus)) (*query* #+clisp (mapcan #'(lambda (param) (list (keywordify param) - (ext:convert-string-from-bytes - (ext:convert-string-to-bytes - (http-query-parameter param) - charset:iso-8859-1) - charset:utf-8))) + (http-query-parameter param))) (http-query-parameter-list)) #-clisp '()) (*http-env* (http-get-env-vars)) (*subpath-query* (subseq (gethash "REQUEST_URI" *http-env*) - (length (if (eq *site* :mst-plus) - (gethash "SCRIPT_NAME" *http-env*) - "/journal")))) + (length (ecase *site* + (:mst-plus (gethash "SCRIPT_NAME" *http-env*)) + (:nfs.net "/journal"))))) (*subpath-string* (subseq *subpath-query* 0 (or (position #\? *subpath-query*) @@ -59,15 +55,22 @@ "/home/mulk/Dokumente/Projekte/Mulkblog/journal.cgi"))) (*script-dir* (make-pathname :directory (pathname-directory *script-filename*))) - (*data-dir* (if (eq *site* :mst-plus) - *script-dir* - #p"/home/protected/journal/")) + (*data-dir* (ecase *site* + (:mst-plus *script-dir*) + (:nfs.net #p"/home/protected/journal/"))) (*cache-dir* (merge-pathnames #p"cache/" *data-dir*)) - (database-file (merge-pathnames #p"journal.sqlite3" *data-dir*))) + (database-file (merge-pathnames #p"journal.sqlite3" *data-dir*)) + (sqlite-library (merge-pathnames #p"libsqlite3.so" + (ecase *site* + (:mst-plus #p"/usr/lib/") + (:nfs.net #p"/usr/local/lib/"))))) + (clsql:push-library-path *script-dir*) + (clsql:push-library-path #p"/usr/local/lib/") + (push *script-dir* clsql-sys:*foreign-library-search-paths*) (clsql-uffi::load-uffi-foreign-library) (uffi:load-foreign-library (merge-pathnames "clsql_uffi.so" *script-dir*)) - (uffi:load-foreign-library #p"/usr/lib/libsqlite3.so") + (uffi:load-foreign-library sqlite-library) (clsql:with-database (db (list (namestring database-file)) :database-type :sqlite3 :make-default t) @@ -77,10 +80,10 @@ #+clisp (defun journal-main () - (with-initialised-journal - (let ((*random-state* (make-random-state t))) - (ext:letf ((custom:*terminal-encoding* (ext:make-encoding - :charset charset:utf-8))) + (ext:letf ((custom:*terminal-encoding* (ext:make-encoding + :charset charset:utf-8))) + (with-initialised-journal + (let ((*random-state* (make-random-state t))) (case *action* (:post-comment (with-transaction () (let* ((entry (find-entry *post-number*)) diff --git a/make-clisp-package.sh b/make-clisp-package.sh index 7884e24..6ecf370 100755 --- a/make-clisp-package.sh +++ b/make-clisp-package.sh @@ -1,5 +1,6 @@ #! /bin/sh cd ~ -for x in Downloads/Git/clsql Downloads/Darcs/{metabang-bind,iterate,cl-markdown,cl-containers,defsystem-compatibility,alexandria,lw-compat,moptilities,metatilities,Bese/arnesi_dev,Bese/yaclml,asdf-system-connections,closer-mop,parenscript} .clc/site/{xml-emitter-1.0.2,lisp-cgi-utils-0.9,cl-utilities-1.2.4} /usr/share/common-lisp/source/{asdf,cl-fad,cl-ppcre,slime,split-sequence}; do - find "$x" -not -regex ".*/_darcs/.*" \( -regex ".*\\.lisp" -or -regex ".*\\.asd" -or -regex "COPYING" -or -regex "index.lml" \) -done | tar -T - -cjf - | ssh -t mulk_benkard@ssh.phx.nearlyfreespeech.net 'mkdir -p /tmp/clisp-stuff && cd /tmp/clisp-stuff && tar xjf - && mkdir -p /tmp/asdf && cd /tmp/asdf && find ../clisp-stuff -name "*.asd" | xargs -I "{}" ln -sf "{}" . && cd ../clisp-stuff && mkdir -p /home/tmp/clisp-stuff/Downloads/Darcs/asdf-system-connections/website/source/images && touch /home/tmp/clisp-stuff/Downloads/Darcs/asdf-system-connections/website/source/index.lml && clisp -x "(load \"usr/share/common-lisp/source/asdf/asdf.lisp\")" -x "(let ((asdf:*central-registry* (quote (#p\"/tmp/asdf/\")))) (dolist (x (list :cl-ppcre :cl-fad :iterate :cl-markdown :parenscript :yaclml :lisp-cgi-utils :alexandria :xml-emitter :split-sequence :clsql :clsql-sqlite3)) (asdf:oos (quote asdf:load-op) x)) (saveinitmem \"lispinit.mem\"))" && gzip -f lispinit.mem && mv lispinit.mem.gz /home/private/ && rm -rf /tmp/clisp-stuff && rm -rf /tmp/asdf' +for x in Downloads/Git/clsql Downloads/Darcs/{cffi,metabang-bind,iterate,cl-markdown,cl-containers,defsystem-compatibility,alexandria,lw-compat,moptilities,metatilities,Bese/arnesi_dev,Bese/yaclml,asdf-system-connections,closer-mop,parenscript} .clc/site/{xml-emitter-1.0.2,lisp-cgi-utils-0.10,cl-utilities-1.2.4} /usr/share/common-lisp/source/{asdf,cl-fad,cl-ppcre,slime,split-sequence}; do + find "$x" -not -regex ".*/_darcs/.*" \( -regex ".*\\.c" -or -regex "Makefile.*" -or -regex ".*\\.lisp" -or -regex ".*\\.asd" -or -regex "COPYING" -or -regex "index.lml" \) +done | tar -T - -cjf - | ssh mulk_benkard@ssh.phx.nearlyfreespeech.net 'mkdir -p /tmp/clisp-stuff && cd /tmp/clisp-stuff && tar xjf - && mkdir -p /tmp/asdf && cd /tmp/asdf && find ../clisp-stuff -name "*.asd" | xargs -I "{}" ln -sf "{}" . && mkdir -p /home/tmp/clisp-stuff/Downloads/Darcs/asdf-system-connections/website/source/images && touch /home/tmp/clisp-stuff/Downloads/Darcs/asdf-system-connections/website/source/index.lml && gmake -C /tmp/clisp-stuff/Downloads/Git/clsql/uffi' && \ +ssh -t mulk_benkard@ssh.phx.nearlyfreespeech.net 'cd /tmp/clisp-stuff && clisp -x "(load \"usr/share/common-lisp/source/asdf/asdf.lisp\")" -x "(let ((asdf:*central-registry* (quote (#p\"/tmp/asdf/\")))) (dolist (x (list :cffi :cl-ppcre :cl-fad :iterate :cl-markdown :parenscript :yaclml :lisp-cgi-utils :alexandria :xml-emitter :split-sequence :clsql :clsql-sqlite3)) (asdf:oos (quote asdf:load-op) x)) (saveinitmem \"lispinit.mem\"))" && gzip -f lispinit.mem && mv lispinit.mem.gz /home/private/ && mv /tmp/clisp-stuff/Downloads/Git/clsql/uffi/clsql_uffi.so /home/private/ && rm -rf /tmp/clisp-stuff && rm -rf /tmp/asdf' |