Commit 49de0084 authored by tstoeckler's avatar tstoeckler

Issue 1224838 by sun, mjpa: Fix library path not being prepended to JS/CSS files.

parent e455286c
Libraries 7.x-2.x, xxxx-xx-xx
-----------------------------
#1224838 by sun, mjpa: Fix library path not being prepended to JS/CSS files.
#1023258 by tstoeckler: Make 'files' consistently keyed by filename.
#958162 by sun, tstoeckler: Add pre-detect callback group.
#958162 by sun, tstoeckler: Make tests debuggable and provide libraries_info_defaults().
......
......@@ -587,9 +587,8 @@ function libraries_load_files($library) {
// If the value is not an array, it's a filename and passed as first
// (and only) argument.
if (!is_array($options)) {
// Prepend the library path to the file name.
$data = "$path/$options";
$options = NULL;
$data = $options;
$options = array();
}
// In some cases, the first parameter ($data) is an array. Arrays can't
// be passed as keys in PHP, so we have to get $data from the value
......@@ -598,6 +597,8 @@ function libraries_load_files($library) {
$data = $options['data'];
unset($options['data']);
}
// Prepend the library path to the file name.
$data = "$path/$data";
// Apply the default group if the group isn't explicitly given.
if (!isset($options['group'])) {
$options['group'] = ($type == 'js') ? JS_DEFAULT : CSS_DEFAULT;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment