mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -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
|
||||
(list :content content
|
||||
:save-edit (when (clog-auth:is-authorized-p roles can-edit)
|
||||
(lambda (content)
|
||||
(lambda (new-content)
|
||||
(when on-edit
|
||||
(setf content (funcall on-edit content)))
|
||||
(when content
|
||||
(setf new-content (funcall on-edit new-content)))
|
||||
(when new-content
|
||||
(dbi:do-sql
|
||||
sql-connection
|
||||
(sql-update table
|
||||
content
|
||||
new-content
|
||||
"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)
|
||||
(lambda ()
|
||||
(if on-delete
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue