Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
e4043a72
Commit
e4043a72
authored
7 years ago
by
srosse
Browse files
Options
Downloads
Plain Diff
Merge with 026743bd7adc37ea76b184b4807e2395df71a5fd
parents
1b263492
eb236b2a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/olat/core/commons/modules/bc/FolderManager.java
+8
-1
8 additions, 1 deletion
.../java/org/olat/core/commons/modules/bc/FolderManager.java
with
8 additions
and
1 deletion
src/main/java/org/olat/core/commons/modules/bc/FolderManager.java
+
8
−
1
View file @
e4043a72
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment