zberentey/liferay-portal — pull request #144 by lipusz (2012-09-05 10:49:13+00:00)
Title: [TECHNICAL-SUPPORT] LPS-29612 Document Library & Media Gallery - dl.file.entry.thumbnail.enabled=false causes broken image icon (HTTP 404) in all versions of Internet Explorer

Hi Zsolt,

Some notes for my modifications:
1. DLUtil.getThumbnailSrc(): I've added this new if-clause to check the property. It the thumbnail generation is disabled, it will return an URL that points to the default file icons.

2. view_images.jspf: I've discovered during the investigation that the original customer problem also occurs in the Media Gallery portlet. The "href" and "src" URLs are initialized with the right default values, but they are always overwritten by the DLUtil.getPreviewURL() method, thanks to the lack of property check (thumbnail and preview generation as well).

Unfortunately, the getThumbnailSrc() method calls the getPreviewURL() to generate the final src, therefore we cannot add an if-clause similarly to the getThumbnails()'s one to check the value of dl.file.entry.preview.enabled property.

But the "src" is used to point to the thumbnail image, and the queryStrings (like "imageThumbnail=1") are also added by the getThumbnailSrc() method, so we don't have to use the getPreviewURL() to have a thumbnailSrc anymore.

Let me know if you have any questions.

Thanks,
Tibor