Commit 97866bd0 authored by webchick's avatar webchick
Browse files

#263345 by mfb and myself: Fix braino in .install file that prevents module...

#263345 by mfb and myself: Fix braino in .install file that prevents module from actually installing. :P
parent 8e95e850
......@@ -17,7 +17,7 @@ function jquery_ui_requirements($phase) {
if ($phase == 'install') {
// The jquery_ui_get_version() function is in the .module file, which isn't
// loaded yet.
include_once base_path() . drupal_get_path('module', 'jquery_ui') . '/jquery_ui.module';
include_once drupal_get_path('module', 'jquery_ui') . '/jquery_ui.module';
}
$requirements['jquery_ui']['title'] = $t('jQuery UI');
......
......@@ -104,9 +104,11 @@ function jquery_ui_get_version() {
// Attempt to locate the jQuery UI directory and extract the version.
$module_directory = drupal_get_path('module', 'jquery_ui') . '/jquery.ui';
$files = file_scan_directory($module_directory, 'jquery\.ui-all-.*\.js$', $nomask = array('.', '..', 'CVS'), $callback = 0, $recurse = FALSE);
$file = array_shift($files);
if (preg_match('#jquery\.ui-all-(.+)$#', $file->name, $matches)) {
$version = $matches[1];
if (!empty($files)) {
$file = array_shift($files);
if (preg_match('#jquery\.ui-all-(.+)$#', $file->name, $matches)) {
$version = $matches[1];
}
}
return $version;
......
Supports Markdown
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