projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Process Sone templates in their own method
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
web
/
ImageBrowserPage.java
diff --git
a/src/main/java/net/pterodactylus/sone/web/ImageBrowserPage.java
b/src/main/java/net/pterodactylus/sone/web/ImageBrowserPage.java
index
60b22d5
..
5674ee8
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/web/ImageBrowserPage.java
+++ b/
src/main/java/net/pterodactylus/sone/web/ImageBrowserPage.java
@@
-65,13
+65,12
@@
public class ImageBrowserPage extends SoneTemplatePage {
* {@inheritDoc}
*/
@Override
* {@inheritDoc}
*/
@Override
- protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException {
- super.processTemplate(request, templateContext);
+ protected void processSonePage(FreenetRequest request, TemplateContext templateContext) throws RedirectException {
String albumId = request.getHttpRequest().getParam("album", null);
if (albumId != null) {
String albumId = request.getHttpRequest().getParam("album", null);
if (albumId != null) {
-
Album
album = webInterface.getCore().getAlbum(albumId);
+
Optional<Album>
album = webInterface.getCore().getAlbum(albumId);
templateContext.set("albumRequested", true);
templateContext.set("albumRequested", true);
- templateContext.set("album", album);
+ templateContext.set("album", album
.orNull()
);
templateContext.set("page", request.getHttpRequest().getParam("page"));
return;
}
templateContext.set("page", request.getHttpRequest().getParam("page"));
return;
}