Commit 63fbfc92 authored by Tobias Stoeckler's avatar Tobias Stoeckler

#975498 by Gábor Hojtsy: Update JS/CSS-loading to new drupal_add_js/css() API.

parent 310e51c5
......@@ -6,6 +6,7 @@ Libraries x.x-x.x, xxxx-xx-xx
Libraries 7.x-1.x, xxxx-xx-xx
-----------------------------
#975498 by Gábor Hojtsy: Update JS/CSS-loading to new drupal_add_js/css() API.
#958162 by tsteoeckler, sun: Consistent variable naming.
#924130 by aaronbauman: Fixed libraries_get_path() should use drupal_static().
#958162 by tstoeckler, sun: Code clean-up, tests revamp, more robust loading.
......
......@@ -429,9 +429,9 @@ function libraries_load_files($library) {
$data = $options['data'];
unset($options['data']);
}
// Apply the default weight if the weight isn't explicitly given.
if (!isset($options['weight'])) {
$options['weight'] = ($type == 'js') ? JS_DEFAULT : CSS_DEFAULT;
// Apply the default group if the group isn't explicitly given.
if (!isset($options['group'])) {
$options['group'] = ($type == 'js') ? JS_DEFAULT : CSS_DEFAULT;
}
call_user_func('drupal_add_' . $type, $data, $options);
$count++;
......@@ -498,4 +498,3 @@ function libraries_get_version($library, $options) {
}
fclose($file);
}
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