summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel Carleton-Barnes2013-01-24 02:02:53 (GMT)
committer Gabriel Carleton-Barnes2013-01-24 02:02:53 (GMT)
commit713072f3523b28e4821dec9e04c0e461db93c46d (patch)
treefce46a86ee7e9b9d7375c7a26917197278ea37d2
parentb7fb0a2900c8feded529bc4d8f0b6c8d4b93bd7b (diff)
Adding manual detection of proper version of libraries module in mailchimp.install
-rw-r--r--mailchimp.install8
1 files changed, 6 insertions, 2 deletions
diff --git a/mailchimp.install b/mailchimp.install
index 2538ca6..24c0372 100644
--- a/mailchimp.install
+++ b/mailchimp.install
@@ -46,9 +46,13 @@ function mailchimp_requirements($phase) {
);
}
}
- else /* $phase == 'install' */ {
- if (!function_exists(libraries_detect)){
+ if ($phase == 'install') {
+ $path = drupal_get_path('module', libraries) . '/libraries.info';
+ $info = drupal_parse_info_file($path);
+ if (version_compare($info['version'], '7.x-2.0', '<')) {
$requirements['libraries'] = array(
+ 'title' => $t('Libraries'),
+ 'value' => '7.x-2.x',
'description' => $t('libraries 2.x is required for MailChimp.'),
'severity' => REQUIREMENT_ERROR
);