r1474 - xwiki/trunk/core/src/main/java/com/xpn/xwiki/plugin/image
Jeremi Joslin
jeremi at users.forge.objectweb.org
Thu Oct 26 18:32:56 CEST 2006
Author: jeremi
Date: 2006-10-26 18:32:55 +0200 (Thu, 26 Oct 2006)
New Revision: 1474
Modified:
xwiki/trunk/core/src/main/java/com/xpn/xwiki/plugin/image/ImagePlugin.java
Log:
* fix the download of the image plugin, all the image were broken.
Modified: xwiki/trunk/core/src/main/java/com/xpn/xwiki/plugin/image/ImagePlugin.java
===================================================================
--- xwiki/trunk/core/src/main/java/com/xpn/xwiki/plugin/image/ImagePlugin.java 2006-10-25 19:26:01 UTC (rev 1473)
+++ xwiki/trunk/core/src/main/java/com/xpn/xwiki/plugin/image/ImagePlugin.java 2006-10-26 16:32:55 UTC (rev 1474)
@@ -107,13 +107,19 @@
int width = 0;
XWikiAttachment attachmentClone = null;
+ if (!attachment.isImage(context))
+ return attachment;
+
+ String sheight = context.getRequest().getParameter("height");
+ String swidth = context.getRequest().getParameter("width");
+
+ if ((sheight == null || sheight.length() == 0) && (swidth == null || swidth.length() == 0))
+ return attachment;
+
if (imageCache==null)
initCache(context);
try {
- String sheight = context.getRequest().getParameter("height");
- String swidth = context.getRequest().getParameter("width");
-
if (sheight!=null)
height = Integer.parseInt(sheight);
if (swidth!=null)
More information about the Xwiki-notifications
mailing list