From eb1ba851d06259448a98aa4b3a2cb4f283d5ea5c Mon Sep 17 00:00:00 2001 From: Steven Hild <sjhild@wm.edu> Date: Thu, 7 Mar 2013 14:32:07 -0500 Subject: [PATCH] Check dependency XSLTProcessor in InstallController --- .../src/VuFind/Controller/InstallController.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/module/VuFind/src/VuFind/Controller/InstallController.php b/module/VuFind/src/VuFind/Controller/InstallController.php index 67048a360b6..a1b27369594 100644 --- a/module/VuFind/src/VuFind/Controller/InstallController.php +++ b/module/VuFind/src/VuFind/Controller/InstallController.php @@ -237,7 +237,7 @@ class InstallController extends AbstractBase { $requiredFunctionsExist = function_exists('mb_substr') && is_callable('imagecreatefromstring') - && function_exists('mcrypt_module_open'); + && function_exists('mcrypt_module_open') && class_exists('XSLTProcessor'); return array( 'title' => 'Dependencies', @@ -297,6 +297,16 @@ class InstallController extends AbstractBase ."and look at the PHP installation instructions for your platform."; } + // Is the XSL library missing? + if (!class_exists('XSLTProcessor')) { + $msg + = "Your PHP installation appears to be missing the XSL plug-in." + ." For details on how to do this, see " + ."http://vufind.org/wiki/vufind2:installation_notes " + ."and look at the PHP installation instructions for your platform."; + $this->flashMessenger()->setNamespace('error')->addMessage($msg); + $problems++; + } return $this->createViewModel(array('problems' => $problems)); } -- GitLab