Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
library_attach
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
library_attach
Commits
9714cfd7
Commit
9714cfd7
authored
12 years ago
by
Dave Reid
Browse files
Options
Downloads
Patches
Plain Diff
Ensure that explode() does not mess up a library name with a colon in it.
parent
6a80aadb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
library_attach.module
+2
-2
2 additions, 2 deletions
library_attach.module
views/library_attach_plugin_display_extender_libraries.inc
+1
-1
1 addition, 1 deletion
views/library_attach_plugin_display_extender_libraries.inc
with
3 additions
and
3 deletions
library_attach.module
+
2
−
2
View file @
9714cfd7
...
...
@@ -71,13 +71,13 @@ function library_attach_set_view_mode_libraries($entity_type, $bundle, $view_mod
function
library_attach_add_libraries
(
$libraries
,
&
$render_element
=
NULL
)
{
if
(
isset
(
$render_element
)
&&
is_array
(
$render_element
))
{
foreach
(
$libraries
as
$key
)
{
list
(
$module
,
$name
)
=
explode
(
':'
,
$key
);
list
(
$module
,
$name
)
=
explode
(
':'
,
$key
,
2
);
$render_element
[
'#attached'
][
'library'
][]
=
array
(
$module
,
$name
);
}
}
else
{
foreach
(
$libraries
as
$key
)
{
list
(
$module
,
$name
)
=
explode
(
':'
,
$key
);
list
(
$module
,
$name
)
=
explode
(
':'
,
$key
,
2
);
drupal_add_library
(
$module
,
$name
);
}
}
...
...
This diff is collapsed.
Click to expand it.
views/library_attach_plugin_display_extender_libraries.inc
+
1
−
1
View file @
9714cfd7
...
...
@@ -26,7 +26,7 @@ class library_attach_plugin_display_extender_libraries extends views_plugin_disp
protected
function
getLibrarySummary
(
array
$libraries
)
{
$library_names
=
array
();
foreach
(
$libraries
as
$key
)
{
list
(
$module
,
$name
)
=
explode
(
':'
,
$key
);
list
(
$module
,
$name
)
=
explode
(
':'
,
$key
,
2
);
if
(
$library
=
drupal_get_library
(
$module
,
$name
))
{
$library_names
[]
=
check_plain
(
$library
[
'title'
]);
}
...
...
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