Merged V3.1 to HEAD

13304: Final part of I18N fixes for Share. TinyMCE editor lang packs: fr, de, jp, es. Added Spanish (es) to web-client TinyMCE integration also which was missing it.
   13316: Liferay Portal 4.3.X fixes for JSF Client portlet:
           - Tested deployment instructions for Alfresco and Liferay 4.3.X - still work as per wiki page http://wiki.alfresco.com/wiki/Deploying_2.1WAR_Liferay4.3
           - Upload is working (tested from Add Content, Upload New Version and Update)
           - Fixed bug raised in ETHREEOH-1170
          NOTE: there are still issues with the other Ajax Mootools powered portlets...
   13333: Fix for ETHREEOH-1410, ETHREEOH-1402, ETHREEOH-1396, ETHREEOH-1393, ETHREEOH-1380, ETHREEOH-1274, ETHREEOH-1266, ETHREEOH-1257 - Paging control submit box now correctly handles enter key press without submitting parent form.
   13348: Fix for ETHREEOH-980 - a user home space can no longer be set directly to User Homes.
          So they are not accidently given full permissions to that folder or the ability to rename it later.
   13349: Fix for ETHREEOH-980 - a user home space can no longer be set directly to User Homes [missed files]
   13350: Fix for ETHREEOH-971. CIFS and WebDav online edit modes fixed to work in IE as best as possible in FF.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13590 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2009-03-12 11:19:13 +00:00
parent 2bc702e125
commit b906c50cdf
27 changed files with 995 additions and 123 deletions

View File

@@ -25,6 +25,7 @@ package org.alfresco.web.app.servlet;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Enumeration;
import java.util.List;
import javax.servlet.ServletConfig;
@@ -59,7 +60,7 @@ import org.springframework.web.context.support.WebApplicationContextUtils;
*/
public class UploadFileServlet extends BaseServlet
{
private static final long serialVersionUID = -5482538466491052873L;
private static final long serialVersionUID = -5482538466491052875L;
private static final Log logger = LogFactory.getLog(UploadFileServlet.class);
private ConfigService configService;
@@ -165,8 +166,30 @@ public class UploadFileServlet extends BaseServlet
}
}
session.setAttribute(FileUploadBean.getKey(uploadId), bean);
// examine the appropriate session to try and find the User object
if (Application.inPortalServer() == false)
{
session.setAttribute(FileUploadBean.getKey(uploadId), bean);
}
else
{
// naff solution as we need to enumerate all session keys until we find the one that
// should match our User objects - this is weak but we don't know how the underlying
// Portal vendor has decided to encode the objects in the session
Enumeration enumNames = session.getAttributeNames();
while (enumNames.hasMoreElements())
{
String name = (String)enumNames.nextElement();
// find an Alfresco value we know must be there...
if (name.startsWith("javax.portlet.p") && name.endsWith(AuthenticationHelper.AUTHENTICATION_USER))
{
String key = name.substring(0, name.lastIndexOf(AuthenticationHelper.AUTHENTICATION_USER));
session.setAttribute(key + FileUploadBean.getKey(uploadId), bean);
break;
}
}
}
if (bean.getFile() == null && uploadId != null && logger.isWarnEnabled())
{
logger.warn("no file uploaded for upload id: " + uploadId);