From 713771ece7c1c28d05910819c99aa07beb1bce66 Mon Sep 17 00:00:00 2001 From: Nikola Kotur Date: Mon, 21 May 2012 11:00:36 +0200 Subject: [PATCH] Issue #1433274: You do not do module_enable in $runtime == 'install'. --- oauth_common.install | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/oauth_common.install b/oauth_common.install index 39b0937..2fc868c 100644 --- a/oauth_common.install +++ b/oauth_common.install @@ -26,22 +26,24 @@ function oauth_common_requirements($phase) { ); } - // Check that OAuth library has been placed at the libraries directory - if (!module_exists('libraries')) { - module_enable(array('libraries')); - } - if ($path = libraries_get_path('oauth')) { - $library = $path . '/OAuth.php'; - $requirements['oauth_lib'] = array('title' => $t('OAuth library')); - if (!file_exists($library)) { - $requirements['oauth_lib']['value'] = $t('Missing'); - $requirements['oauth_lib']['description'] = $t('You must download it from ' . - 'Google Code ' . - 'and place it at !library', array('!library' => $library)); - $requirements['oauth_lib']['severity'] = REQUIREMENT_ERROR; - } else { - $requirements['oauth_lib']['value'] = $t('Installed'); - $requirements['oauth_lib']['severity'] = REQUIREMENT_OK; + if ($phase == 'runtime') { + // Check that OAuth library has been placed at the libraries directory + if (!module_exists('libraries')) { + module_enable(array('libraries')); + } + if ($path = libraries_get_path('oauth')) { + $library = $path . '/OAuth.php'; + $requirements['oauth_lib'] = array('title' => $t('OAuth library')); + if (!file_exists($library)) { + $requirements['oauth_lib']['value'] = $t('Missing'); + $requirements['oauth_lib']['description'] = $t('You must download it from ' . + 'Google Code ' . + 'and place it at !library', array('!library' => $library)); + $requirements['oauth_lib']['severity'] = REQUIREMENT_ERROR; + } else { + $requirements['oauth_lib']['value'] = $t('Installed'); + $requirements['oauth_lib']['severity'] = REQUIREMENT_OK; + } } } -- 1.7.10.2