X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Rakka%2FStorage%2FRepos.hs;h=ae4ce706d9f1a04f014b5e94d813e0476e71797f;hb=88747f2;hp=756740eb842540f30df5a47c26651cf07c4f28ff;hpb=706ee842873fdceb9465cdf6a583176ab855fae2;p=Rakka.git diff --git a/Rakka/Storage/Repos.hs b/Rakka/Storage/Repos.hs index 756740e..ae4ce70 100644 --- a/Rakka/Storage/Repos.hs +++ b/Rakka/Storage/Repos.hs @@ -10,8 +10,6 @@ module Rakka.Storage.Repos , putAttachmentIntoRepository ) where - -import Codec.Binary.UTF8.String import Control.Monad import Data.List import qualified Data.Map as M @@ -19,12 +17,12 @@ import Data.Maybe import Data.Set (Set) import qualified Data.Set as S hiding (Set) import Data.Time +import qualified Data.Time.W3C as W3C import Network.HTTP.Lucu hiding (redirect) import Rakka.Attachment import Rakka.Page import Rakka.SystemConfig import Rakka.Utils -import Rakka.W3CDateTime import Subversion.FileSystem import Subversion.FileSystem.DirEntry import Subversion.FileSystem.Revision @@ -163,7 +161,7 @@ loadPageInRepository repos name rev $ fmap chomp (lookup "svn:mime-type" props) lastMod <- unsafeIOToFS $ - liftM (fromJust . parseW3CDateTime . chomp . fromJust) + liftM (fromJust . W3C.parse . chomp . fromJust) (getRevisionProp' fs pageRev "svn:date") return Entity { @@ -198,7 +196,7 @@ loadPageInRepository repos name rev dest = chomp $ decodeString content lastMod <- unsafeIOToFS $ - liftM (fromJust . parseW3CDateTime . chomp . fromJust) + liftM (fromJust . W3C.parse . chomp . fromJust) (getRevisionProp' fs pageRev "svn:date") isLocked <- liftM isJust (getNodeProp path "rakka:isLocked") @@ -375,7 +373,7 @@ deletePageFromRepository repos userID name else return NotFound when (status == NoContent) - $ do doReposTxn repos + $ ( (doReposTxn repos rev "[Rakka]" (Just "Automatic commit by Rakka for page deleting") @@ -385,8 +383,8 @@ deletePageFromRepository repos userID name attachmentExists <- isDirectory attachmentPath when attachmentExists $ do deleteEntry attachmentPath - deleteEmptyParentDirectories attachmentPath - return () + deleteEmptyParentDirectories attachmentPath) + >> return () ) return status