Browse Source

ISLANDORA-322: Reopened ticket, added requirement that it test for a different xsl library.

pull/18/head
Nigel Banks 13 years ago
parent
commit
7e8f2f62c8
  1. 61
      fedora_repository.install

61
fedora_repository.install

@ -1,7 +1,5 @@
<?php <?php
/** /**
* @file fedora_repository.install * @file fedora_repository.install
*/ */
@ -41,7 +39,7 @@ function fedora_repository_requirements($phase) {
$requirements = array(); $requirements = array();
if ($phase == 'install') { if ($phase == 'install') {
// Test for SOAP // Test for SOAP
$requirements['fedora-soap']['title'] = t("PHP SOAP extension library"); $requirements['fedora-soap']['title'] = t("PHP SOAP extension library");
if (!class_exists('SoapClient')) { if (!class_exists('SoapClient')) {
@ -53,35 +51,47 @@ function fedora_repository_requirements($phase) {
$requirements['fedora-soap']['value'] = t("Installed"); $requirements['fedora-soap']['value'] = t("Installed");
$requirements['fedora-soap']['severity'] = REQUIREMENT_OK; $requirements['fedora-soap']['severity'] = REQUIREMENT_OK;
} }
// Test for Curl // Test for Curl
$requirements['curl']['title'] = "PHP Curl extension library"; $requirements['curl']['title'] = "PHP Curl extension library";
if ( ! function_exists('curl_init') ) { if (!function_exists('curl_init')) {
$requirements['curl']['value'] = t("Not installed"); $requirements['curl']['value'] = t("Not installed");
$requirements['curl']['severity'] = REQUIREMENT_ERROR; $requirements['curl']['severity'] = REQUIREMENT_ERROR;
$requirements['curl']['description'] = t("Ensure that the PHP Curl extension is installed."); $requirements['curl']['description'] = t("Ensure that the PHP Curl extension is installed.");
} }
else { else {
$requirements['curl']['value'] = t("Installed"); $requirements['curl']['value'] = t("Installed");
$requirements['curl']['serenity'] = REQUIREMENT_OK; $requirements['curl']['serenity'] = REQUIREMENT_OK;
} }
// Test for DOM // Test for DOM
$requirements['dom']['title'] = "PHP DOM XML extension library"; $requirements['dom']['title'] = "PHP DOM XML extension library";
if ( ! method_exists('DOMDocument', 'loadHTML') ) { if (!method_exists('DOMDocument', 'loadHTML')) {
$requirements['dom']['value'] = t("Not installed"); $requirements['dom']['value'] = t("Not installed");
$requirements['dom']['severity'] = REQUIREMENT_ERROR; $requirements['dom']['severity'] = REQUIREMENT_ERROR;
$requirements['dom']['description'] = t("Ensure that the PHP DOM XML extension is installed."); $requirements['dom']['description'] = t("Ensure that the PHP DOM XML extension is installed.");
} }
else { else {
$requirements['dom']['value'] = t("Installed"); $requirements['dom']['value'] = t("Installed");
$requirements['dom']['serenity'] = REQUIREMENT_OK; $requirements['dom']['serenity'] = REQUIREMENT_OK;
} }
// Test for XSLT
$requirements['xsl']['title'] = "PHP XSL extension library";
if (!class_exists('XSLTProcessor')) {
$requirements['xslt']['value'] = t("Not installed");
$requirements['xslt']['severity'] = REQUIREMENT_ERROR;
$requirements['xslt']['description'] = t("Ensure that the PHP XSL extension is installed.");
}
else {
$requirements['xslt']['value'] = t("Installed");
$requirements['xslt']['serenity'] = REQUIREMENT_OK;
}
// Test for Imagick // Test for Imagick
$requirements['imagick']['title'] = t("Image Magick library"); $requirements['imagick']['title'] = t("Image Magick library");
//if ( ! class_exists('Imagick') ) { //if ( ! class_exists('Imagick') ) {
if ( ! file_exists('convert') ) { if (!file_exists('convert')) {
$requirements['imagick']['value'] = t("Not installed"); $requirements['imagick']['value'] = t("Not installed");
$requirements['imagick']['severity'] = REQUIREMENT_ERROR; $requirements['imagick']['severity'] = REQUIREMENT_ERROR;
$requirements['imagick']['description'] = t('Ensure that the Image Magick library is installed.'); $requirements['imagick']['description'] = t('Ensure that the Image Magick library is installed.');
@ -89,11 +99,11 @@ function fedora_repository_requirements($phase) {
else { else {
$requirements['imagick']['value'] = t("Installed"); $requirements['imagick']['value'] = t("Installed");
$requirements['imagick']['severity'] = REQUIREMENT_OK; $requirements['imagick']['severity'] = REQUIREMENT_OK;
} }
// Test for Kakadu // Test for Kakadu
$requirements['kakadu']['title'] = t("Kakadu library"); $requirements['kakadu']['title'] = t("Kakadu library");
if ( ! file_exists('kdu_compress') ) { if (!file_exists('kdu_compress')) {
$requirements['kakadu']['value'] = t("Not installed"); $requirements['kakadu']['value'] = t("Not installed");
$requirements['kakadu']['severity'] = REQUIREMENT_ERROR; $requirements['kakadu']['severity'] = REQUIREMENT_ERROR;
$requirements['kakadu']['description'] = t('Ensure that the Kakadu library is installed.'); $requirements['kakadu']['description'] = t('Ensure that the Kakadu library is installed.');
@ -101,7 +111,7 @@ function fedora_repository_requirements($phase) {
else { else {
$requirements['kakadu']['value'] = t("Installed"); $requirements['kakadu']['value'] = t("Installed");
$requirements['kakadu']['severity'] = REQUIREMENT_OK; $requirements['kakadu']['severity'] = REQUIREMENT_OK;
} }
} }
elseif ($phase == 'runtime') { elseif ($phase == 'runtime') {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
@ -110,8 +120,7 @@ function fedora_repository_requirements($phase) {
if (!fedora_available()) { if (!fedora_available()) {
$requirements['fedora-repository']['value'] = t("Not available"); $requirements['fedora-repository']['value'] = t("Not available");
$requirements['fedora-repository']['severity'] = REQUIREMENT_ERROR; $requirements['fedora-repository']['severity'] = REQUIREMENT_ERROR;
$requirements['fedora-repository']['description'] = t('Ensure that Fedora is running and that the <a href="@collection-settings">collection settings</a> are correct.', $requirements['fedora-repository']['description'] = t('Ensure that Fedora is running and that the <a href="@collection-settings">collection settings</a> are correct.', array('@collection-settings' => $base_url . '/admin/settings/fedora_repository'));
array('@collection-settings' => $base_url . '/admin/settings/fedora_repository'));
} }
else { else {
$requirements['fedora-repository']['value'] = t("Available"); $requirements['fedora-repository']['value'] = t("Available");

Loading…
Cancel
Save