X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Rakka%2FWiki%2FInterpreter%2FPageList.hs;h=cffd93806f20c50b490dec6af1a9ac5596198a72;hb=b4c0033f297c28d95ad9298b489126331224bc42;hp=1ad6728c3ba370649cb961b8deeb8e452727ab2a;hpb=23977989ef4be7316b1c2c3f709ca1e8e6bb7f84;p=Rakka.git diff --git a/Rakka/Wiki/Interpreter/PageList.hs b/Rakka/Wiki/Interpreter/PageList.hs index 1ad6728..cffd938 100644 --- a/Rakka/Wiki/Interpreter/PageList.hs +++ b/Rakka/Wiki/Interpreter/PageList.hs @@ -44,22 +44,24 @@ recentUpdatesInterp sto = ctxStorage ctx cond <- newCondition - setPhrase cond "[UVSET]" when onlyEntity $ addAttrCond cond "@type STRNE application/x-rakka-redirection" when onlySummarized $ addAttrCond cond "rakka:summary STRNE" -- summary が空でない - setOrder cond "@mdate NUMD" - setMax cond items + setPhrase cond "[UVSET]" + setOrder cond "@mdate NUMD" + setMax cond items result <- searchPages sto cond - pages <- mapM ( \ (name, rev) - -> getPage sto name (Just rev) >>= return . fromJust - ) result + pages <- mapM (getPageByHP sto) (srPages result) mkPageList showSummary pages } where + getPageByHP :: Storage -> HitPage -> IO Page + getPageByHP sto hp + = getPage sto (hpPageName hp) (Just (hpPageRev hp)) >>= return . fromJust + mkPageList :: Bool -> [Page] -> IO BlockElement mkPageList showSummary pages = do items <- mapM (mkListItem showSummary) pages