X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FImageBrowserPage.kt;fp=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FImageBrowserPage.kt;h=e9911e6ab58a95c50ab8a08667e8050fe10a1c59;hp=60a2bd5bf0f9b8ba4510a9da59ac0e603eb0d89e;hb=74cbe983cd38da24847e6247ac595cb70d8e115b;hpb=88ed72c4e8971a1d6e93a889f6774338d53682c6 diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/ImageBrowserPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/ImageBrowserPage.kt index 60a2bd5..e9911e6 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/ImageBrowserPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/ImageBrowserPage.kt @@ -14,9 +14,9 @@ import java.net.URI * The image browser page is the entry page for the image management. */ class ImageBrowserPage(template: Template, webInterface: WebInterface): - SoneTemplatePage("imageBrowser.html", template, "Page.ImageBrowser.Title", webInterface, true) { + LoggedInPage("imageBrowser.html", template, "Page.ImageBrowser.Title", webInterface) { - override fun handleRequest(freenetRequest: FreenetRequest, templateContext: TemplateContext) { + override fun handleRequest(freenetRequest: FreenetRequest, currentSone: Sone, templateContext: TemplateContext) { if ("album" in freenetRequest.parameters) { templateContext["albumRequested"] = true templateContext["album"] = webInterface.core.getAlbum(freenetRequest.parameters["album"]!!) @@ -40,7 +40,7 @@ class ImageBrowserPage(template: Template, webInterface: WebInterface): } } else { templateContext["soneRequested"] = true - templateContext["sone"] = webInterface.core.getSone(freenetRequest.httpRequest.getParam("sone")) ?: getCurrentSone(freenetRequest.toadletContext) + templateContext["sone"] = webInterface.core.getSone(freenetRequest.httpRequest.getParam("sone")) ?: currentSone } }