diff --git a/src/MyWebLog/Handlers/Admin.fs b/src/MyWebLog/Handlers/Admin.fs index 2446197..fefd983 100644 --- a/src/MyWebLog/Handlers/Admin.fs +++ b/src/MyWebLog/Handlers/Admin.fs @@ -384,7 +384,7 @@ module Theme = if ctx.Request.HasFormContentType && ctx.Request.Form.Files.Count > 0 then let themeFile = Seq.head ctx.Request.Form.Files match deriveIdFromFileName themeFile.FileName with - | Ok themeId when themeId <> adminTheme -> + | Ok themeId when themeId <> ThemeId "admin" -> let data = ctx.Data let! exists = data.Theme.Exists themeId let isNew = not exists diff --git a/src/MyWebLog/Handlers/Helpers.fs b/src/MyWebLog/Handlers/Helpers.fs index 74cd160..13a0501 100644 --- a/src/MyWebLog/Handlers/Helpers.fs +++ b/src/MyWebLog/Handlers/Helpers.fs @@ -355,13 +355,6 @@ let themedView template next ctx hash = task { return! viewForTheme (hash[ViewContext.WebLog] :?> WebLog).ThemeId template next ctx hash } -/// The ID for the admin theme -let adminTheme = ThemeId "admin" - -/// Display a bare view for the admin theme -let adminBareView template = - bareForTheme adminTheme template - /// Display a page for an admin endpoint let adminPage pageTitle includeCsrf next ctx (content: AppViewContext -> XmlNode list) = task { let! messages = getCurrentMessages ctx @@ -416,7 +409,7 @@ let someTask<'T> (it: 'T) = Task.FromResult(Some it) /// Create an absolute URL from a string that may already be an absolute URL let absoluteUrl (url: string) (ctx: HttpContext) = - if url.StartsWith "http" then url else ctx.WebLog.AbsoluteUrl (Permalink url) + if url.StartsWith "http" then url else ctx.WebLog.AbsoluteUrl(Permalink url) open MyWebLog.Data diff --git a/src/MyWebLog/Handlers/Page.fs b/src/MyWebLog/Handlers/Page.fs index 070976c..2d23bc1 100644 --- a/src/MyWebLog/Handlers/Page.fs +++ b/src/MyWebLog/Handlers/Page.fs @@ -115,18 +115,9 @@ let private findPageRevision pgId revDate (ctx: HttpContext) = task { let previewRevision (pgId, revDate) : HttpHandler = requireAccess Author >=> fun next ctx -> task { match! findPageRevision pgId revDate ctx with | Some pg, Some rev when canEdit pg.AuthorId ctx -> - return! {| - content = - [ """