Commit 23e0d81d authored by DuneBL's avatar DuneBL Committed by Primsi
Browse files

Issue #2730869 by DuneBL, j2r, Primsi: hook_requirements should check the minified version

parent c0b9ca11
......@@ -12,15 +12,15 @@ function dropzonejs_requirements($phase) {
$requirements = [];
$path = DRUPAL_ROOT . '/libraries/dropzone/dist/dropzone.js';
$path = DRUPAL_ROOT . '/libraries/dropzone/dist/min/dropzone.min.js';
if (\Drupal::moduleHandler()->moduleExists('libraries')) {
$path = libraries_get_path('dropzone') . '/dist/dropzone.js';
$path = libraries_get_path('dropzone') . '/dist/min/dropzone.min.js';
}
if (!file_exists($path)) {
$requirements['dropzonejs_library'] = array(
'title' => t('Dropzone library missing'),
'description' => t('Dropzonejs requires the dropzone.js library.
'description' => t('Dropzonejs requires the dropzone.min.js library.
Download it (https://github.com/enyo/dropzone) and place it in the
libraries folder (/libraries)'),
'severity' => REQUIREMENT_ERROR,
......
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