Skip to content

Commit

Permalink
Fix chapter titles for maps
Browse files Browse the repository at this point in the history
  • Loading branch information
snoyberg committed Aug 5, 2011
1 parent e28882b commit 31b81b7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Wiki.hs
Expand Up @@ -228,9 +228,10 @@ instance YesodBreadcrumbs Wiki where
breadcrumb (BookChapterR mnslug mnslugs) = do
(_, mn) <- runDB $ getMapNode mnslug mnslugs
title <-
case tMapNodeCtopic mn of
Just tid -> runDB $ topicTitle <$> get404 tid
Nothing -> return "" -- FIXME
case (tMapNodeCtopic mn, tMapNodeCmap mn) of
(Just tid, _) -> runDB $ topicTitle <$> get404 tid
(Nothing, Just tmid) -> runDB $ tMapTitle <$> get404 tmid
(Nothing, Nothing) -> return "" -- FIXME
return (MsgBookChapterTitle title, Just BookR)
breadcrumb SearchR = return (MsgSearchTitle, Just RootR)
breadcrumb (WikiR ps) = do
Expand Down

0 comments on commit 31b81b7

Please sign in to comment.