Changeset 12663 in project


Ignore:
Timestamp:
11/30/08 23:56:40 (11 years ago)
Author:
azul
Message:

Fix bug I introduced recently. Also optimize the sorting of posts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/3/svnwiki-weblog/trunk/svnwiki-weblog.scm

    r12628 r12663  
    2929    (if (directory? (svnwiki-make-pathname path-in path))
    3030      path
    31       (svnwiki-make-pathname (butlast (string-split path "/"))))))
     31      (svnwiki-make-pathname (svnwiki-dirname path)))))
    3232
    3333(define (list-all-posts env)
     
    3535    (let ((dir-path (weblog-dir-path env)))
    3636      (list->stream
    37         (sort
     37        (sort-key-cache
    3838          (let ((path-real (svnwiki-make-pathname path-in dir-path)))
    3939            (remove
     
    4343                (entry-subs
    4444                  (post-commit-changed-files path-real (string-append base "/" dir-path) user password)))))
    45           (key>
    46             (lambda (x)
    47               (post-seconds path-in (svnwiki-make-pathname dir-path (car x)) x))))))))
     45          >
     46          (lambda (x)
     47            (post-seconds path-in (svnwiki-make-pathname dir-path (car x)) x)))))))
    4848
    4949(define (post-seconds path-in path post)
     
    212212                        (b last-change)))
    213213                    ".")))))
    214            (let loop ((posts (stream-map car (list-all-posts (environment-capture env (path-weblog)))))
     214           (let loop ((posts (stream-map car (list-all-posts (environment env ((path path-weblog))))))
    215215                      (next #f))
    216216             ; I used to think posts would not be null the first time (in which
     
    244244                 (loop (stream-cdr posts) (stream-car posts)))))))
    245245        (author
    246           (let ((posts-count (stream-length (list-all-posts (environment-capture env (path-weblog)))))
     246          (let ((posts-count (stream-length (list-all-posts (environment env ((path path-weblog))))))
    247247                (number (get-posts-number env)))
    248248            (html-stream
Note: See TracChangeset for help on using the changeset viewer.