commit 34cc3eaf171ced68b30c825e317c00b5f762cc7d
parent 593b9953db81f90b54089a9dcaf1c2ddbdfb660c
Author: Natasha Kerensikova <natgh@instinctive.eu>
Date: Tue, 21 Apr 2026 19:03:33 +0000
Mark-3 gruiks are pushed as protected iens
Diffstat:
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/cgi.scm b/src/cgi.scm
@@ -597,7 +597,7 @@ END-OF-CSS
(with-transaction db
(lambda ()
(exec
- (sql db "INSERT INTO entry(url,type,description,notes,ctime,mtime)
+ (sql db "INSERT INTO entry(url,type,description,notes,ctime,mtime,ptime,protected)
SELECT url,
CASE WHEN description IS NULL THEN NULL
WHEN substr(description,1,1)='<' THEN 'html'
@@ -607,10 +607,13 @@ END-OF-CSS
ELSE 'text' END,
trim(description,char(10))||char(10),
trim(notes,char(10))||char(10),
- stime,?
+ stime,?,
+ CASE WHEN mark>=3 THEN ? ELSE NULL END,
+ CASE WHEN mark>=3 THEN 1 ELSE 0 END
FROM gruik
WHERE id=?;")
(current-seconds)
+ (current-seconds)
id)
(exec
(sql db "INSERT OR IGNORE INTO tagrel(url_id,tag_id)
@@ -619,7 +622,8 @@ END-OF-CSS
LEFT OUTER JOIN entry ON gruik.url=entry.url
WHERE gruik_id=?;")
id)
- (db-set-mark id 2 -1)))))
+ (db-set-mark id 2 -1)
+ (db-set-mark id 3 -1)))))
(define (db-set-mark id old-v new-v)
(exec (sql db "UPDATE gruik SET mtime=?, mark=?, stime=?