Commit 7cd52946 authored by Svein-Tore Griff With's avatar Svein-Tore Griff With

Start adding back the concatination, but temporarily disable it since it depends on D6 API's

parent aa787b18
......@@ -447,16 +447,16 @@ function h5p_add_files_and_settings($node, $mode) {
// TODO: Fix aggregation of scripts and styles.
$settings['h5p']['cid-' . $content_id]['styles'] = $file_paths['preloadedCss'];
$settings['h5p']['cid-' . $content_id]['scripts'] = $file_paths['preloadedJs'];
/*
$preprocess_css = (variable_get('preprocess_css', FALSE) && (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'update'));
$preprocess_js = (variable_get('preprocess_js', FALSE) && (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'update'));
$directory = file_stream_wrapper_get_instance_by_uri('public://')->realpath();
$is_writable = is_dir($directory) && is_writable($directory) && (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PUBLIC);
$is_writable = is_dir($directory) && is_writable($directory);
// Aggregate library styles and scripts for faster loading when using iframe.
// Core files are not included to leverage browser caching! See http://css-tricks.com/one-two-three
if ($is_writable && $preprocess_css) {
if ($is_writable && $preprocess_css && FALSE) {
$filename = 'h5p-' . $node->nid . '-' . $node->vid . '.css';
// Refactor styles array to Drupal eatable format.
......@@ -471,7 +471,7 @@ function h5p_add_files_and_settings($node, $mode) {
$settings['h5p']['cid-' . $content_id]['styles'] = $file_paths['preloadedCss'];
}
if ($is_writable && $preprocess_js) {
if ($is_writable && $preprocess_js && FALSE) {
$filename = 'h5p-' . $node->nid . '-' . $node->vid . '.js';
// Refactor scripts array to Drupal eatable format.
......@@ -486,7 +486,6 @@ function h5p_add_files_and_settings($node, $mode) {
else {
$settings['h5p']['cid-' . $content_id]['scripts'] = $file_paths['preloadedJs'];
}
*/
}
// Set libraryPath:
......
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