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
86dea3d5
Commit
86dea3d5
authored
11 years ago
by
gnaegi
Browse files
Options
Downloads
Patches
Plain Diff
OO-814 fix resolving of images in CP editor
parent
892518ba
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/ims/cp/ui/VFSRootCPContainer.java
+6
-8
6 additions, 8 deletions
src/main/java/org/olat/ims/cp/ui/VFSRootCPContainer.java
with
6 additions
and
8 deletions
src/main/java/org/olat/ims/cp/ui/VFSRootCPContainer.java
+
6
−
8
View file @
86dea3d5
...
@@ -111,14 +111,12 @@ public class VFSRootCPContainer extends AbstractVirtualContainer implements VFSC
...
@@ -111,14 +111,12 @@ public class VFSRootCPContainer extends AbstractVirtualContainer implements VFSC
@Override
@Override
public
VFSItem
resolve
(
String
path
)
{
public
VFSItem
resolve
(
String
path
)
{
// 1) try to resolve directly from root (editor initialization)
// 1) try to resolve directly from root (HTML editor instance)
if
(!
path
.
startsWith
(
"/"
))
{
VFSItem
item
=
rootContainer
.
resolve
(
path
);
VFSItem
item
=
rootContainer
.
resolve
(
path
);
if
(
item
!=
null
)
{
if
(
item
!=
null
)
{
return
item
;
return
item
;
}
}
}
// 2) try to resolve from virtual containers (events from link chooser)
// 2) try to resolve from virtual containers (events from link chooser)
for
(
VFSItem
root:
roots
)
{
for
(
VFSItem
root:
roots
)
{
if
(
root
instanceof
VFSContainer
)
{
if
(
root
instanceof
VFSContainer
)
{
...
@@ -126,7 +124,7 @@ public class VFSRootCPContainer extends AbstractVirtualContainer implements VFSC
...
@@ -126,7 +124,7 @@ public class VFSRootCPContainer extends AbstractVirtualContainer implements VFSC
String
dir
=
container
.
getName
();
String
dir
=
container
.
getName
();
if
(
path
.
startsWith
(
"/"
+
dir
+
"/"
))
{
if
(
path
.
startsWith
(
"/"
+
dir
+
"/"
))
{
// remove virtual directory name from path to resolve from real container
// remove virtual directory name from path to resolve from real container
VFSItem
item
=
container
.
resolve
(
path
.
substring
(
dir
.
length
()
+
1
));
item
=
container
.
resolve
(
path
.
substring
(
dir
.
length
()
+
1
));
if
(
item
!=
null
)
{
if
(
item
!=
null
)
{
return
item
;
return
item
;
}
}
...
...
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