Add a core thread that periodically saves the configuration.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / EditProfilePage.java
index 52468a3..43dd15b 100644 (file)
@@ -84,7 +84,7 @@ public class EditProfilePage extends SoneTemplatePage {
                                        field.setValue(value);
                                }
                                currentSone.setProfile(profile);
-                               webInterface.getCore().saveSone(currentSone);
+                               webInterface.getCore().touchConfiguration();
                                throw new RedirectException("editProfile.html");
                        } else if (request.getHttpRequest().getPartAsStringFailsafe("add-field", 4).equals("true")) {
                                String fieldName = request.getHttpRequest().getPartAsStringFailsafe("field-name", 256).trim();
@@ -92,7 +92,7 @@ public class EditProfilePage extends SoneTemplatePage {
                                        profile.addField(fieldName);
                                        currentSone.setProfile(profile);
                                        fields = profile.getFields();
-                                       webInterface.getCore().saveSone(currentSone);
+                                       webInterface.getCore().touchConfiguration();
                                        throw new RedirectException("editProfile.html#profile-fields");
                                } catch (IllegalArgumentException iae1) {
                                        templateContext.set("fieldName", fieldName);