--- /Users/Albright/Sites/sbdc/sites/all/modules/beautify/beautify.install copy 2009-02-09 15:35:48.000000000 -0800 +++ /Users/Albright/Sites/sbdc/sites/all/modules/beautify/beautify.install 2009-02-13 08:48:57.000000000 -0800 @@ -4,26 +4,26 @@ * Implementation of hook_requirements(). */ function beautify_requirements($phase) { - $requirements = array(); - $t = get_t(); - switch ($phase) { - case 'runtime': - if (!beautify_htmltidy_test($message, $version)) { - $requirements['beautify_htmltidy'] = array( - 'title' => $t('HTML Tidy'), - 'description' => $t('Download and install the HTML Tidy binary http://tidy.sourceforge.net/'), - 'severity' => $phase == 'install' ? REQUIREMENT_WARNING : REQUIREMENT_ERROR, - 'value' => $t('Tidy binary not found.'), - ); - } - else { - $requirements['beautify_htmltidy'] = array( - 'title' => $t('HTML Tidy'), + if ($phase === 'runtime' && variable_get('beautify_method', 'builtin') === 'htmltidy') { + if (!beautify_htmltidy_test($message, $version)) { + $requirements = array( + 'beautify_htmltidy' => array( + 'title' => t('HTML Tidy'), + 'description' => t('Download and install the HTML Tidy binary at http://tidy.sourceforge.net/'), + 'severity' => REQUIREMENT_ERROR, + 'value' => t('Tidy binary not found.'), + ), + ); + } + else { + $requirements = array( + 'beautify_htmltidy' => array( + 'title' => t('HTML Tidy'), 'severity' => REQUIREMENT_OK, - 'value' => $t('HTMLTidy was found %tidy_version', array('%tidy_version' => $version)), - ); - } - break; + 'value' => t('HTMLTidy was found: %tidy_version', array('%tidy_version' => $version)), + ), + ); + } + return $requirements; } - return $requirements; }