diff options
Diffstat (limited to 'lisp/sql')
| -rw-r--r-- | lisp/sql/gallery.lisp | 3 | ||||
| -rw-r--r-- | lisp/sql/general-pkg.lisp | 22 |
2 files changed, 15 insertions, 10 deletions
diff --git a/lisp/sql/gallery.lisp b/lisp/sql/gallery.lisp index 2f4231d..501691d 100644 --- a/lisp/sql/gallery.lisp +++ b/lisp/sql/gallery.lisp @@ -16,6 +16,9 @@ (mime_type :initarg :mime_type :initform nil :accessor mime_type) + (video_embed_url :initarg :video_embed_url + :initform nil + :accessor video_embed_url) (content :initarg :content :initform nil :accessor content) diff --git a/lisp/sql/general-pkg.lisp b/lisp/sql/general-pkg.lisp index 5a92ed4..0d1b3db 100644 --- a/lisp/sql/general-pkg.lisp +++ b/lisp/sql/general-pkg.lisp @@ -23,20 +23,22 @@ (defmethod insert-gallery ((general-pkg general-pkg) (gallery gallery)) (setf (*table gallery) (format nil - "general.insert_gallery('~a', '~a', '~a', '~a')" - (description gallery) - (filename gallery) - (mime_type gallery) - (content gallery))) + "general.insert_gallery(~a, ~a, ~a, ~a, ~a)" + (org-ckons-sql::sanitize gallery (description gallery)) + (org-ckons-sql::sanitize gallery (filename gallery)) + (org-ckons-sql::sanitize gallery (mime_type gallery)) + (org-ckons-sql::sanitize gallery (video_embed_url gallery)) + (org-ckons-sql::sanitize gallery (content gallery)))) (setf (id gallery) (caar (call-pg-function general-pkg gallery))) (id gallery)) (defmethod update-gallery ((general-pkg general-pkg) (gallery gallery)) (setf (*table gallery) (format nil - "general.update_gallery(~a, '~a', '~a', '~a', '~a')" + "general.update_gallery(~a, ~a, ~a, ~a, ~a, ~a)" (id gallery) - (description gallery) - (filename gallery) - (mime_type gallery) - (content gallery))) + (org-ckons-sql::sanitize gallery (description gallery)) + (org-ckons-sql::sanitize gallery (filename gallery)) + (org-ckons-sql::sanitize gallery (mime_type gallery)) + (org-ckons-sql::sanitize gallery (video_embed_url gallery)) + (org-ckons-sql::sanitize gallery (content gallery)))) (caar (call-pg-function general-pkg gallery))) |
