diff --git a/scheme/httpd/surflets/surflets.scm b/scheme/httpd/surflets/surflets.scm
index a592149..a42184b 100644
--- a/scheme/httpd/surflets/surflets.scm
+++ b/scheme/httpd/surflets/surflets.scm
@@ -144,7 +144,10 @@
(define URL-rule
(cons 'URL
- (lambda (tag URI text) (list "" text ""))))
+ (lambda (tag URI . maybe-text) (list ""
+ (if (pair? maybe-text)
+ maybe-text
+ URI)""))))
(define default-rules
`(,attribute-rule
@@ -163,10 +166,34 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; outdater
+(define-record-type outdater :outdater
+ (real-make-outdater outdated?)
+ outdater?
+ (outdated? outdater-outdated? set-outdater-outdated?!))
+(define (make-outdater)
+ (real-make-outdater #f))
+(define-syntax if-outdated
+ (syntax-rules ()
+ ((if-outdated outdater consequence alternative)
+ (if (outdater-outdated? outdater)
+ consequence
+ (begin
+ (set-outdater-outdated?! outdater #t)
+ alternative)))))
+(define (show-outdated url)
+ (send-html
+ `(html (title "Outdated Data")
+ (body (h1 "Outdated Data")
+ (p "The page or action you requested relies on outdated data")
+ (p "Try to "
+ (URL ,url "reload")
+ " the page to get current data.")))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; input-fields