commit d07686bb141231c63316affcd04522dc0c5206eb
parent 00e0a2f0c770c4d29a339d95bc48e7e4eae0a4f8
Author: Natasha Kerensikova <natgh@instinctive.eu>
Date: Sat, 27 Jun 2026 20:02:05 +0000
Comment URL is computed when an entry is added
Diffstat:
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/iens.scm b/src/iens.scm
@@ -558,9 +558,16 @@
(let ((source (if (list? spec) (car spec) '()))
(title (if (list? spec) (cadr spec) '()))
(url (if (list? spec) (caddr spec) spec)))
- (exec (sql db "INSERT INTO entry(url,title,source,notes,ctime,mtime)
- VALUES (?,?,?,?,?,?);")
- url title source notes ctime ctime))
+ (exec (sql db "INSERT INTO entry(url,title,source,source_url,
+ notes,ctime,mtime)
+ VALUES (?,?,?,?,?,?,?);")
+ url
+ title
+ source
+ (if (null? source) '() (comment-link source url))
+ notes
+ ctime
+ ctime))
(let ((new-id (last-insert-rowid db)))
(exec (sql db "INSERT INTO tagrel SELECT ?,id FROM tag WHERE auto=1;")
new-id)