X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FImageBrowserPage.kt;h=e9911e6ab58a95c50ab8a08667e8050fe10a1c59;hb=74cbe983cd38da24847e6247ac595cb70d8e115b;hp=31813551d5017e26261ba2f5467267005217a0d4;hpb=ffd92ca2374c0b2218e583d02e0bdd24b8c110ae;p=Sone.git 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 3181355..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")).orNull() ?: getCurrentSone(freenetRequest.toadletContext) + templateContext["sone"] = webInterface.core.getSone(freenetRequest.httpRequest.getParam("sone")) ?: currentSone } }