diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-02-01 17:11:00 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-02-01 17:11:00 +0000 |
commit | 643ad121a63849ded59fa86c5292997e2ccc59ae (patch) | |
tree | 0510c0272f00baa7f203a954e1b8d3c2e1306b62 /modules | |
parent | 631354733a772e99768cef66bfc2e6a191f1a87d (diff) | |
download | brdo-643ad121a63849ded59fa86c5292997e2ccc59ae.tar.gz brdo-643ad121a63849ded59fa86c5292997e2ccc59ae.tar.bz2 |
- Patch #363391 by ShawnClark, Dave Reid: add SimpleTest's DomDocument requirement.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/simpletest/simpletest.install | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/modules/simpletest/simpletest.install b/modules/simpletest/simpletest.install index 1370c20cf..2aa13e926 100644 --- a/modules/simpletest/simpletest.install +++ b/modules/simpletest/simpletest.install @@ -107,24 +107,24 @@ function simpletest_requirements($phase) { $t = get_t(); $has_curl = function_exists('curl_init'); + $has_domdocument = class_exists('DOMDocument'); - switch ($phase) { - case 'runtime': - $requirements['simpletest'] = array( - 'title' => $t('cURL'), - 'value' => $has_curl ? $t('Enabled') : $t('Not found'), - 'severity' => $has_curl ? REQUIREMENT_OK : REQUIREMENT_ERROR, - ); - break; - case 'install': - if (!$has_curl) { - $requirements['simpletest'] = array( - 'title' => $t('cURL'), - 'severity' => REQUIREMENT_ERROR, - 'description' => $t('Simpletest could not be installed because the PHP <a href="!curl_url">cURL</a> library is not available.', array('!curl_url' => 'http://php.net/manual/en/curl.setup.php')), - ); - } - break; + $requirements['curl'] = array( + 'title' => $t('cURL'), + 'value' => $has_curl ? $t('Enabled') : $t('Not found'), + ); + if (!$has_curl) { + $requirements['curl']['severity'] = REQUIREMENT_ERROR; + $requirements['curl']['description'] = $t('Simpletest could not be installed because the PHP <a href="@curl_url">cURL</a> library is not available.', array('@curl_url' => 'http://php.net/manual/en/curl.setup.php')); + } + + $requirements['php_domdocument'] = array( + 'title' => $t('PHP DOMDocument class'), + 'value' => $has_domdocument ? $t('Enabled') : $t('Not found'), + ); + if (!$has_domdocument) { + $requirements['php_domdocument']['severity'] = REQUIREMENT_ERROR; + $requirements['php_domdocument']['description'] =t('SimpleTest requires the DOMDocument class to be available. Please check the configure command at the <a href="@link-phpinfo">PHP info page</a>.', array('@link-phpinfo' => url('admin/reports/status/php'))); } return $requirements; |