mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 10:40:45 -08:00
bug in save content
This commit is contained in:
parent
75d3762677
commit
bf41f07abb
1 changed files with 6 additions and 5 deletions
|
|
@ -338,16 +338,17 @@ and if CAN-EDIT unless they are set to nil."
|
||||||
(funcall theme obj :content-body
|
(funcall theme obj :content-body
|
||||||
(list :content content
|
(list :content content
|
||||||
:save-edit (when (clog-auth:is-authorized-p roles can-edit)
|
:save-edit (when (clog-auth:is-authorized-p roles can-edit)
|
||||||
(lambda (content)
|
(lambda (new-content)
|
||||||
(when on-edit
|
(when on-edit
|
||||||
(setf content (funcall on-edit content)))
|
(setf new-content (funcall on-edit new-content)))
|
||||||
(when content
|
(when new-content
|
||||||
(dbi:do-sql
|
(dbi:do-sql
|
||||||
sql-connection
|
sql-connection
|
||||||
(sql-update table
|
(sql-update table
|
||||||
content
|
new-content
|
||||||
"key=? and createdate=?")
|
"key=? and createdate=?")
|
||||||
(list page (getf content :|createdate|))))))
|
(list page (getf content :|createdate|)))
|
||||||
|
(print (getf content :|createdate|)))))
|
||||||
:do-delete (when (clog-auth:is-authorized-p roles can-edit)
|
:do-delete (when (clog-auth:is-authorized-p roles can-edit)
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(if on-delete
|
(if on-delete
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue