mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
TemplateImageResolver was being passed a null FacesContext. Default image no longer cached should no context be available.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6140 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -140,7 +140,7 @@ public class DeclarativeWebScriptRegistry extends AbstractLifecycleBean
|
||||
{
|
||||
public String resolveImagePathForName(String filename, FileTypeImageSize size)
|
||||
{
|
||||
return Utils.getFileTypeImage(FacesContext.getCurrentInstance(), filename, size);
|
||||
return Utils.getFileTypeImage(servletContext, filename, size);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@@ -1285,6 +1285,11 @@ public final class Utils
|
||||
// found the image for this extension - save it for later
|
||||
s_fileExtensionMap.put(key, image);
|
||||
}
|
||||
else if ((fc == null) && (sc == null))
|
||||
{
|
||||
// we have neither FacesContext nor ServerContext so return the default image but don't cache it
|
||||
image = defaultImage;
|
||||
}
|
||||
else
|
||||
{
|
||||
// not found, save the default image for this extension instead
|
||||
|
Reference in New Issue
Block a user