*
* 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
*
* 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
import net.pterodactylus.sone.text.TextFilter;
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;
import net.pterodactylus.sone.text.TextFilter;
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;
super("editAlbum.html", template, "Page.EditAlbum.Title", webInterface, true);
}
super("editAlbum.html", template, "Page.EditAlbum.Title", webInterface, true);
}
@Override
protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException {
super.processTemplate(request, templateContext);
if (request.getMethod() == Method.POST) {
@Override
protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException {
super.processTemplate(request, templateContext);
if (request.getMethod() == Method.POST) {
throw new RedirectException("noPermission.html");
}
if ("true".equals(request.getHttpRequest().getPartAsStringFailsafe("moveLeft", 4))) {
throw new RedirectException("noPermission.html");
}
if ("true".equals(request.getHttpRequest().getPartAsStringFailsafe("moveLeft", 4))) {
- if (album.getParent() == null) {
- currentSone.moveAlbumUp(album);
- webInterface.getCore().touchConfiguration();
- throw new RedirectException("imageBrowser.html?sone=" + currentSone.getId());
- }
- album.getParent().moveAlbumUp(album);
- if (album.getParent() == null) {
- currentSone.moveAlbumDown(album);
- webInterface.getCore().touchConfiguration();
- throw new RedirectException("imageBrowser.html?sone=" + currentSone.getId());
- }
- album.getParent().moveAlbumDown(album);
+ album.get().moveDown();
String title = request.getHttpRequest().getPartAsStringFailsafe("title", 100).trim();
if (title.length() == 0) {
templateContext.set("titleMissing", true);
return;
}
String description = request.getHttpRequest().getPartAsStringFailsafe("description", 1000).trim();
String title = request.getHttpRequest().getPartAsStringFailsafe("title", 100).trim();
if (title.length() == 0) {
templateContext.set("titleMissing", true);
return;
}
String description = request.getHttpRequest().getPartAsStringFailsafe("description", 1000).trim();