X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FMoveProfileFieldAjaxPage.java;h=e8377f972448a44ee72954d1baebc681e372bc5e;hp=780e4d13eb4803c7000d9e6ee4d7f529f4531889;hb=7b55e0be6a3283e43a9bbab98f82aebdd948eb33;hpb=f4ea1e1b3526175e255831c975d6eea813589f25 diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/MoveProfileFieldAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/MoveProfileFieldAjaxPage.java index 780e4d1..e8377f9 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/MoveProfileFieldAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/MoveProfileFieldAjaxPage.java @@ -1,5 +1,5 @@ /* - * Sone - MoveProfileFieldAjaxPage.java - Copyright © 2011 David Roden + * Sone - MoveProfileFieldAjaxPage.java - Copyright © 2011–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 @@ -21,7 +21,7 @@ import net.pterodactylus.sone.data.Profile; import net.pterodactylus.sone.data.Profile.Field; import net.pterodactylus.sone.data.Sone; import net.pterodactylus.sone.web.WebInterface; -import net.pterodactylus.util.json.JsonObject; +import net.pterodactylus.sone.web.page.FreenetRequest; /** * AJAX page that lets the user move a profile field up or down. @@ -50,7 +50,7 @@ public class MoveProfileFieldAjaxPage extends JsonPage { * {@inheritDoc} */ @Override - protected JsonObject createJsonObject(Request request) { + protected JsonReturnObject createJsonObject(FreenetRequest request) { Sone currentSone = getCurrentSone(request.getToadletContext()); Profile profile = currentSone.getProfile(); String fieldId = request.getHttpRequest().getParam("field"); @@ -71,7 +71,7 @@ public class MoveProfileFieldAjaxPage extends JsonPage { return createErrorJsonObject("not-possible"); } currentSone.setProfile(profile); - webInterface.getCore().saveSone(currentSone); + webInterface.getCore().touchConfiguration(); return createSuccessJsonObject(); }