X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FOptionsPage.java;h=4aaf2327e2d5e6e139752bdd364bd453cd1ab59a;hb=ab14aa498b45ecd2222b03d6c3607461a0ceb3f4;hp=dff7ecfbe7eb8872d8e06b5b917e15004851b3fe;hpb=76ed638264e531a26e35647d13702db865a52321;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/OptionsPage.java b/src/main/java/net/pterodactylus/sone/web/OptionsPage.java index dff7ecf..4aaf232 100644 --- a/src/main/java/net/pterodactylus/sone/web/OptionsPage.java +++ b/src/main/java/net/pterodactylus/sone/web/OptionsPage.java @@ -1,5 +1,5 @@ /* - * Sone - OptionsPage.java - Copyright © 2010–2015 David Roden + * Sone - OptionsPage.java - Copyright © 2010–2016 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,7 +24,7 @@ import java.util.List; import net.pterodactylus.sone.core.Preferences; import net.pterodactylus.sone.data.Sone; -import net.pterodactylus.sone.data.Sone.ShowCustomAvatars; +import net.pterodactylus.sone.data.SoneOptions.LoadExternalContent; import net.pterodactylus.sone.fcp.FcpInterface.FullAccessRequired; import net.pterodactylus.sone.web.page.FreenetRequest; import net.pterodactylus.util.template.Template; @@ -58,8 +58,7 @@ public class OptionsPage extends SoneTemplatePage { * {@inheritDoc} */ @Override - protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException { - super.processTemplate(request, templateContext); + protected void handleRequest(FreenetRequest request, TemplateContext templateContext) throws RedirectException { Preferences preferences = webInterface.getCore().getPreferences(); Sone currentSone = webInterface.getCurrentSone(request.getToadletContext(), false); if (request.getMethod() == Method.POST) { @@ -76,7 +75,7 @@ public class OptionsPage extends SoneTemplatePage { boolean showNotificationNewReplies = request.getHttpRequest().isPartSet("show-notification-new-replies"); currentSone.getOptions().setShowNewReplyNotifications(showNotificationNewReplies); String showCustomAvatars = request.getHttpRequest().getPartAsStringFailsafe("show-custom-avatars", 32); - currentSone.getOptions().setShowCustomAvatars(ShowCustomAvatars.valueOf(showCustomAvatars)); + currentSone.getOptions().setShowCustomAvatars(LoadExternalContent.valueOf(showCustomAvatars)); webInterface.getCore().touchConfiguration(); } Integer insertionDelay = parseInt(request.getHttpRequest().getPartAsStringFailsafe("insertion-delay", 16), null);