Browse Source

Merge pull request #12 from bwoodhead/6.x

ISLANDORA-268: Added module install tests for xml, xslt and curl
pull/13/merge
Ben Woodhead 13 years ago
parent
commit
7951033390
  1. 39
      fedora_repository.install

39
fedora_repository.install

@ -41,6 +41,8 @@ function fedora_repository_requirements($phase) {
$requirements = array();
if ($phase == 'install') {
// Test for SOAP
$requirements['fedora-soap']['title'] = t("PHP SOAP extension library");
if (!class_exists('SoapClient')) {
$requirements['fedora-soap']['value'] = t("Not installed");
@ -51,6 +53,43 @@ function fedora_repository_requirements($phase) {
$requirements['fedora-soap']['value'] = t("Installed");
$requirements['fedora-soap']['severity'] = REQUIREMENT_OK;
}
// Test for Curl
$requirements['curl']['title'] = "PHP Curl extension library";
if ( ! function_exists('curl_init') ) {
$requirements['curl']['value'] = t("Not installed");
$requirements['curl']['severity'] = REQUIREMENT_ERROR;
$requirements['curl']['description'] = t("Ensure that the PHP Curl extension is installed.");
}
else {
$requirements['curl']['value'] = t("Installed");
$requirements['curl']['serenity'] = REQUIREMENT_OK;
}
// Test for DOM
$requirements['dom']['title'] = "PHP DOM XML extension library";
if ( ! method_exists('DOMDocument', 'loadHTML') ) {
$requirements['dom']['value'] = t("Not installed");
$requirements['dom']['severity'] = REQUIREMENT_ERROR;
$requirements['dom']['description'] = t("Ensure that the PHP DOM XML extension is installed.");
}
else {
$requirements['dom']['value'] = t("Installed");
$requirements['dom']['serenity'] = REQUIREMENT_OK;
}
// Test for XSLT
$requirements['xslt']['title'] = "PHP XSLT extension library";
if ( ! function_exists('xslt_process') ) {
$requirements['xslt']['value'] = t("Not installed");
$requirements['xslt']['severity'] = REQUIREMENT_ERROR;
$requirements['xslt']['description'] = t("Ensure that the PHP HMAC extension is installed.");
}
else {
$requirements['xslt']['value'] = t("Installed");
$requirements['xslt']['serenity'] = REQUIREMENT_OK;
}
}
elseif ($phase == 'runtime') {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');

Loading…
Cancel
Save