X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=Rakka.git;a=blobdiff_plain;f=Rakka%2FStorage%2FRepos.hs;h=b74f48cb36bb862c92399bb595fd38557996813b;hp=76889d7e0ad5fac702041a17b4bb787fe8a491a5;hb=f1016753ef45a4c25745ccb6e81e5acbc085cc42;hpb=fb86cb6941e466fd43ce45338024c79d0fdb33a2 diff --git a/Rakka/Storage/Repos.hs b/Rakka/Storage/Repos.hs index 76889d7..b74f48c 100644 --- a/Rakka/Storage/Repos.hs +++ b/Rakka/Storage/Repos.hs @@ -179,10 +179,10 @@ loadPageInRepository repos name rev -> True , entityRevision = pageRev , entityLastMod = zonedTimeToUTC lastMod - , entitySummary = lookup "rakka:summary" props + , entitySummary = fmap decodeString (lookup "rakka:summary" props) , entityOtherLang = fromMaybe M.empty $ fmap - (M.fromList . fromJust . deserializeStringPairs) + (M.fromList . fromJust . deserializeStringPairs . decodeString) (lookup "rakka:otherLang" props) , entityContent = content , entityUpdateInfo = undefined @@ -315,13 +315,13 @@ putPageIntoRepository repos userID page setNodeProp path "rakka:isFeed" (encodeFlag $ entityIsFeed page) setNodeProp path "rakka:isLocked" (encodeFlag $ entityIsLocked page) setNodeProp path "rakka:isBinary" (encodeFlag $ entityIsBinary page) - setNodeProp path "rakka:summary" (entitySummary page) + setNodeProp path "rakka:summary" (fmap encodeString $ entitySummary page) setNodeProp path "rakka:otherLang" (let otherLang = entityOtherLang page in if M.null otherLang then Nothing else - Just (serializeStringPairs $ M.toList otherLang)) + Just (encodeString $ serializeStringPairs $ M.toList otherLang)) applyTextLBS path Nothing (entityContent page) encodeFlag :: Bool -> Maybe String @@ -409,7 +409,7 @@ loadAttachmentInRepository repos pName aName rev path = mkAttachmentPath pName aName loadAttachment' :: Rev a - loadAttachment' = getFileContents path >>= return . deserializeFromString + loadAttachment' = getFileContents path >>= return . deserializeFromString . decodeString putAttachmentIntoRepository :: Attachment a =>