Merge branch 'release-0.8.8'
[Sone.git] / src / main / java / net / pterodactylus / sone / web / EditImagePage.java
index 874a078..9a29c85 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * FreenetSone - WebInterface.java - Copyright © 2010–2012 David Roden
+ * Sone - EditImagePage.java - Copyright © 2010–2013 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
@@ -73,8 +73,7 @@ public class EditImagePage extends SoneTemplatePage {
                                if (title.length() == 0) {
                                        templateContext.set("titleMissing", true);
                                }
-                               image.setTitle(title);
-                               image.setDescription(TextFilter.filter(request.getHttpRequest().getHeader("host"), description));
+                               image.modify().setTitle(title).setDescription(TextFilter.filter(request.getHttpRequest().getHeader("host"), description)).update();
                        }
                        webInterface.getCore().touchConfiguration();
                        throw new RedirectException(returnPage);