--- beautify.module.orig 2009-01-13 02:15:11.000000000 -0800 +++ beautify.module 2009-01-14 10:48:05.000000000 -0800 @@ -370,7 +370,7 @@ function beautify_set_cache($input) { * the tidied string */ function beautify_htmltidy_command($input, &$errors, &$warnings) { - $path = variable_get('beautify_htmltidy_path', '/usr/bin/tidy'); + $path = variable_get('beautify_htmltidy_path', drupal_get_path('module', 'beautify') . '/bin/tidy' . (strpos(PHP_OS, 'WIN' === 0) ? '.exe' : '')); if (!file_exists($path)) { $message = t("Couldn't find the Tidy binary at '%path', not using tidy.", array('%path' => $path)); watchdog('beautify', $message, WATCHDOG_WARNING); @@ -466,7 +466,7 @@ function beautify_htmltidy_command($inpu } function beautify_htmltidy_run($input, $args, &$output, &$errors, &$warnings) { - $tidypath = variable_get('beautify_htmltidy_path', '/usr/bin/tidy'); + $tidypath = variable_get('beautify_htmltidy_path', drupal_get_path('module', 'beautify') . '/bin/tidy' . (strpos(PHP_OS, 'WIN' === 0) ? '.exe' : ''); if (!file_exists($tidypath)) { watchdog('beautify', 'Failed to find HTML Tidy executable at %beautify_htmltidy_path, not using tidy', array('%beautify_htmltidy_path' => $tidypath), WATCHDOG_WARNING); $output = ''; @@ -531,54 +531,48 @@ function beautify_htmltidy_run($input, $ * TRUE if found, * FALSE if error. */ -function beautify_htmltidy_test(&$message = '', &$version = '') { - $path = variable_get('beautify_htmltidy_path', '/usr/bin/tidy'); - if (!file_exists($path)) { - $pattern = '@\\\\+@'; // one or more backslashes - // Windows paths - if (substr(PHP_OS, 0, 3) == 'WIN') { - $possible_paths = array( - preg_replace($pattern, '/', dirname(__FILE__)) .'/bin/tidy.exe' - ); - } - // Unix paths - else { - $possible_paths = array( - '/bin/tidy', - '/usr/bin/tidy', - '/usr/local/bin/tidy', - preg_replace($pattern, '/', dirname(__FILE__)) .'/bin/tidy', - ); - } - - $message = t('Searching for HTML Tidy in:'); - $message .= '