Change a couple of method argument names
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / pages / DeleteAlbumPage.kt
index 66f989a..98eea86 100644 (file)
@@ -12,19 +12,19 @@ import net.pterodactylus.util.template.TemplateContext
 class DeleteAlbumPage(template: Template, webInterface: WebInterface):
                SoneTemplatePage("deleteAlbum.html", template, "Page.DeleteAlbum.Title", webInterface, true) {
 
-       override fun handleRequest(request: FreenetRequest, templateContext: TemplateContext) {
-               if (request.isPOST) {
-                       val album = webInterface.core.getAlbum(request.httpRequest.getPartAsStringFailsafe("album", 36)) ?: throw RedirectException("invalid.html")
+       override fun handleRequest(freenetRequest: FreenetRequest, templateContext: TemplateContext) {
+               if (freenetRequest.isPOST) {
+                       val album = webInterface.core.getAlbum(freenetRequest.httpRequest.getPartAsStringFailsafe("album", 36)) ?: throw RedirectException("invalid.html")
                        if (!album.sone.isLocal) {
                                throw RedirectException("noPermission.html")
                        }
-                       if (request.httpRequest.getPartAsStringFailsafe("abortDelete", 4) == "true") {
+                       if (freenetRequest.httpRequest.getPartAsStringFailsafe("abortDelete", 4) == "true") {
                                throw RedirectException("imageBrowser.html?album=${album.id}")
                        }
                        webInterface.core.deleteAlbum(album)
                        throw RedirectException(if (album.parent.isRoot) "imageBrowser.html?sone=${album.sone.id}" else "imageBrowser.html?album=${album.parent.id}")
                }
-               val album = webInterface.core.getAlbum(request.httpRequest.getParam("album"))
+               val album = webInterface.core.getAlbum(freenetRequest.httpRequest.getParam("album"))
                templateContext["album"] = album ?: throw RedirectException("invalid.html")
        }