Changeset 3498
- Timestamp:
- 07/18/08 12:33:20 (4 months ago)
- Files:
-
- trunk/projects/bos/web/contract-tree.lisp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/projects/bos/web/contract-tree.lisp
r3490 r3498 21 21 (defun contract-node-find-corresponding-store-image (node) 22 22 (let ((store-images (get-keyword-store-images (contract-node-keyword node)))) 23 (when (< 1 (length store-images)) 24 (warn "~D store-images for ~S" (length store-images) node)) 25 (first store-images))) 23 (if (alexandria:length= 1 store-images) 24 ;; good, there is only one 25 (first store-images) 26 ;; We will just return NIL, if we cannot find one. 27 ;; If there are too many, we will return the newest one and delete the rest. 28 (progn 29 (warn "~D store-images for ~S" (length store-images) node) 30 (let ((store-images-newest-first 31 (sort (copy-list store-images) #'> :key #'blob-timestamp))) 32 (mapc #'delete-object (rest store-images-newest-first)) 33 (first store-images-newest-first)))))) 26 34 27 35 (defmethod initialize-instance :after ((node contract-node) &key args) … … 35 43 (defparameter *contract-tree-images-size* 128) ; was 256 36 44 37 ;;; XXX soll spaeter von was anderem abhaengen38 45 (defmethod leaf-node-p ((node contract-node)) 39 (= 9(depth node)))46 (= 10 (depth node))) 40 47 41 48 (defun contract-geo-box (contract) … … 297 304 (let* ((path (parse-path path)) 298 305 (node (find-node-with-path *contract-tree* path)) 299 (image (image node))) 306 (image (image node))) 307 (assert image nil "contract-tree node ~{~D~} does not have an image" path) 300 308 (hunchentoot:handle-if-modified-since (blob-timestamp image)) 301 309 (with-store-image* (image)
