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
eed07bc3
Commit
eed07bc3
authored
12 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-517: hardened against NULL title
parent
a873e65a
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/gui/control/generic/dtabs/DTabImpl.java
+7
-4
7 additions, 4 deletions
...ava/org/olat/core/gui/control/generic/dtabs/DTabImpl.java
with
7 additions
and
4 deletions
src/main/java/org/olat/core/gui/control/generic/dtabs/DTabImpl.java
+
7
−
4
View file @
eed07bc3
...
...
@@ -68,14 +68,17 @@ public class DTabImpl implements Disposable, DTab {
this
.
title
=
title
;
//Root the JumpInPath - typically all resources are opened in tabs
StackedBusinessControl
businessControl
=
new
StackedBusinessControl
(
null
,
wOrigControl
.
getBusinessControl
());
this
.
wControl
=
BusinessControlFactory
.
getInstance
().
createBusinessWindowControl
(
businessControl
,
wOrigControl
);
wControl
=
BusinessControlFactory
.
getInstance
().
createBusinessWindowControl
(
businessControl
,
wOrigControl
);
//TODO:fj:c calculate truncation depending on how many tabs are already open
String
typeName
=
ores
.
getResourceableTypeName
();
String
shortTitle
=
title
;
if
(!
title
.
startsWith
(
I18nManager
.
IDENT_PREFIX
))
{
String
shortTitle
;
if
(
title
==
null
)
{
shortTitle
=
"???"
;
}
else
if
(!
title
.
startsWith
(
I18nManager
.
IDENT_PREFIX
))
{
// don't truncate titles when in inline translation mode (OLAT-3811)
shortTitle
=
Formatter
.
truncate
(
title
,
15
);
}
else
{
shortTitle
=
title
;
}
navElement
=
new
DefaultNavElement
(
shortTitle
,
title
,
"b_resource_"
+
typeName
.
replace
(
"."
,
"-"
));
}
...
...
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