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. 45
      fedora_repository.install

45
fedora_repository.install

@ -1,7 +1,5 @@
<?php <?php
/** /**
* @file fedora_repository.install * @file fedora_repository.install
*/ */
@ -56,32 +54,44 @@ function fedora_repository_requirements($phase) {
// 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 {
$requirements['dom']['value'] = t("Installed");
$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 { else {
$requirements['dom']['value'] = t("Installed"); $requirements['xslt']['value'] = t("Installed");
$requirements['dom']['serenity'] = REQUIREMENT_OK; $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.');
@ -93,7 +103,7 @@ function fedora_repository_requirements($phase) {
// 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.');
@ -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