X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FCreateReplyPage.kt;h=43fbeaf8a38f8f04d351200485f2baff182cebdb;hp=6e003f08f6c5b17ae265cad1b3c5efde12735027;hb=9acbc5bdec4ccb752e0856a501568b0bb6161579;hpb=cfa969d6aa8dc49b2d6487c1ccaaeb3058e86ba9 diff --git a/src/main/java/net/pterodactylus/sone/web/CreateReplyPage.kt b/src/main/java/net/pterodactylus/sone/web/CreateReplyPage.kt index 6e003f0..43fbeaf 100644 --- a/src/main/java/net/pterodactylus/sone/web/CreateReplyPage.kt +++ b/src/main/java/net/pterodactylus/sone/web/CreateReplyPage.kt @@ -1,10 +1,10 @@ package net.pterodactylus.sone.web import net.pterodactylus.sone.text.TextFilter +import net.pterodactylus.sone.utils.isPOST import net.pterodactylus.sone.web.page.FreenetRequest import net.pterodactylus.util.template.Template import net.pterodactylus.util.template.TemplateContext -import net.pterodactylus.util.web.Method.POST /** * This page lets the user post a reply to a post. @@ -16,7 +16,7 @@ class CreateReplyPage(template: Template, webInterface: WebInterface): val postId = request.httpRequest.getPartAsStringFailsafe("post", 36).apply { templateContext["postId"] = this } val text = request.httpRequest.getPartAsStringFailsafe("text", 65536).trim().apply { templateContext["text"] = this } val returnPage = request.httpRequest.getPartAsStringFailsafe("returnPage", 256).apply { templateContext["returnPage"] = this } - if (request.method == POST) { + if (request.isPOST) { if (text == "") { templateContext["errorTextEmpty"] = true return