Author: sdumitriu
Date: 2008-01-03 18:37:32 +0100 (Thu, 03 Jan 2008)
New Revision: 6615
Modified:
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/web/UploadAction.java
Log:
[cleanup] Apply codestyle
Modified:
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/web/UploadAction.java
===================================================================
---
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/web/UploadAction.java
2008-01-03 14:18:36 UTC (rev 6614)
+++
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/web/UploadAction.java
2008-01-03 17:37:32 UTC (rev 6615)
@@ -27,7 +27,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.suigeneris.jrcs.rcs.Version;
import com.xpn.xwiki.XWikiContext;
import com.xpn.xwiki.XWikiException;
@@ -113,10 +112,12 @@
ArrayList params = new ArrayList();
params.add(filename);
params.add(olddoc.getAttachmentRevisionURL(filename, nextRev,
context));
- if (attachment.isImage(context))
+ if (attachment.isImage(context)) {
comment =
context.getMessageTool().get("core.comment.uploadImageComment", params);
- else
- comment =
context.getMessageTool().get("core.comment.uploadAttachmentComment", params);
+ } else {
+ comment =
+
context.getMessageTool().get("core.comment.uploadAttachmentComment", params);
+ }
olddoc.setComment(comment);
// Save the content and the archive
@@ -142,8 +143,9 @@
}
// forward to attach page
String redirect = fileupload.getFileItemAsString("xredirect", context);
- if ((redirect == null) || (redirect.equals("")))
+ if ((redirect == null) || (redirect.equals(""))) {
redirect = context.getDoc().getURL("attach", true, context);
+ }
sendRedirect(response, redirect);
return false;
}
@@ -153,7 +155,8 @@
boolean ajax = ((Boolean) context.get("ajax")).booleanValue();
if (ajax) {
try {
- context.getResponse().getOutputStream().println("error: " +
context.getMessageTool().get((String)context.get("message")));
+ context.getResponse().getOutputStream().println(
+ "error: " + context.getMessageTool().get((String)
context.get("message")));
} catch (IOException ex) {
log.error("Unhandled exception writing output:", ex);
}
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications