Skip to content
Snippets Groups Projects
Commit e4043a72 authored by srosse's avatar srosse
Browse files

Merge with 026743bd7adc37ea76b184b4807e2395df71a5fd

parents 1b263492 eb236b2a
No related branches found
No related tags found
No related merge requests found
...@@ -49,7 +49,7 @@ import org.olat.core.util.vfs.filters.SystemItemFilter; ...@@ -49,7 +49,7 @@ import org.olat.core.util.vfs.filters.SystemItemFilter;
*/ */
public class FolderManager extends BasicManager { public class FolderManager extends BasicManager {
private static FolderModule folderModule = CoreSpringFactory.getImpl(FolderModule.class); private static FolderModule folderModule;
/** /**
* Get this path as a full WebDAV link * Get this path as a full WebDAV link
...@@ -111,6 +111,13 @@ public class FolderManager extends BasicManager { ...@@ -111,6 +111,13 @@ public class FolderManager extends BasicManager {
* @return true: force file download; false: open in new browser window * @return true: force file download; false: open in new browser window
*/ */
public static boolean isDownloadForcedFileType(String name) { public static boolean isDownloadForcedFileType(String name) {
if (folderModule == null) {
// Load only once and keep. Not best practice, in the long run the
// folder manager needs a full spring bean refactoring, but for now
// this is good enough. The not synchronized nature of the
// assignment is not a problem here.
folderModule = CoreSpringFactory.getImpl(FolderModule.class);
}
// If enabled in module, no further checks necessary. // If enabled in module, no further checks necessary.
boolean download = folderModule.isForceDownload(); boolean download = folderModule.isForceDownload();
if (!download) { if (!download) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment