projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Declare variables closer to where they’re first used.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
web
/
EditImagePage.java
diff --git
a/src/main/java/net/pterodactylus/sone/web/EditImagePage.java
b/src/main/java/net/pterodactylus/sone/web/EditImagePage.java
index
0b5f702
..
9a29c85
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/web/EditImagePage.java
+++ b/
src/main/java/net/pterodactylus/sone/web/EditImagePage.java
@@
-1,5
+1,5
@@
/*
/*
- * Sone - EditImagePage.java - Copyright © 2010–201
2
David Roden
+ * Sone - EditImagePage.java - Copyright © 2010–201
3
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
*
* 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);
}
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);
}
webInterface.getCore().touchConfiguration();
throw new RedirectException(returnPage);