Permalink
Browse files

increase entry score

  • Loading branch information...
1 parent b177189 commit 04440d4f473e3c016f764b4c278fcda3471ac2aa @vii committed Nov 18, 2010
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/blog/entry.lisp
View
9 src/blog/entry.lisp
@@ -34,7 +34,7 @@
(defvar *score-decay* (exp (/ (log 1/2) (* 6 30 24 60 60))))
(defvar *comment-score* 8)
-(defvar *entry-score* 2)
+(defvar *entry-score* 10)
(defmyclass entry
blog
@@ -233,8 +233,11 @@
(case-match-fold-ascii-case header
(("expiry-time" "time") (setf value (parse-time value)))
("tags" (setf value (split-into-list-by-comma value))))
- (setf (slot-value entry (normally-capitalized-string-to-symbol header))
- value)))
+ (let ((sym (normally-capitalized-string-to-symbol header)))
+ (cond ((slot-exists-p entry sym)
+ (setf (slot-value entry sym)
+ value))
+ (t (warn "~A" (strcat "blog entry " name " has invalid header " sym " (" header ")")))))))
(my read-paragraphs-from-buffer remaining))
(my set-page))
entry))

0 comments on commit 04440d4

Please sign in to comment.