Merged V4.0-BUG-FIX (4.0.2) to HEAD

34160: Merged V4.0 (V4.0.1) to V4.0-BUG-FIX (4.0.2)
      34159: ALF-12725,ALF-13011: Merge V3.4-BUG-FIX (3.4.9) to V4.0 (V4.0.1)
         34151: Merged V3.4 (3.4.8) to V3.4-BUG-FIX (3.4.9)
            34121: Merged BELARUS/V3.4-BUG-FIX-2012_01_26 to V3.4 (3.4.8)
               Should have been done in 3.4.7 in ALF-12174 but was not found by Eclipse search
               34100: ALF-12948 : Copyright year on "About Alfresco" page is out of date   
               Updated copyright year to 2012.
            34150: ALF-10976 (relates to ALF-10412)
               - Thumbnail mimetype check should have been >= 0 not > 0.
         
      
   


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@34184 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2012-02-23 11:03:50 +00:00
parent 90326eb7e6
commit bdc0214b79
3 changed files with 12 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2011 Alfresco Software Limited.
* Copyright (C) 2005-2012 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -176,12 +176,14 @@ public class UpdateThumbnailActionExecuter extends ActionExecuterAbstractBase
if(contentProp instanceof ContentData)
{
ContentData content = (ContentData)contentProp;
String mimetype = content.getMimetype();
if (mimetypeMaxSourceSizeKBytes != null)
{
Long maxSourceSizeKBytes = mimetypeMaxSourceSizeKBytes.get(content.getMimetype());
if (maxSourceSizeKBytes != null && maxSourceSizeKBytes < (content.getSize()/1024L))
Long maxSourceSizeKBytes = mimetypeMaxSourceSizeKBytes.get(mimetype);
if (maxSourceSizeKBytes != null && maxSourceSizeKBytes >= 0 && maxSourceSizeKBytes < (content.getSize()/1024L))
{
logger.info("Creation of thumbnail, '" + details.getName() + " , content too big ("+maxSourceSizeKBytes+"K)");
logger.debug("Unable to create thumbnail '" + details.getName() + "' for " +
mimetype + " as content is too large ("+(content.getSize()/1024L)+"K > "+maxSourceSizeKBytes+"K)");
return; //avoid transform
}
}