From 0dd44eaf2736bdd0459597dde3521c3ec5a449cd Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Thu, 4 Dec 2014 11:17:44 +0100 Subject: [PATCH 1/2] OC8 and later requires PHP >= 5.4, so we can remove the check from the encryption app --- apps/files_encryption/lib/helper.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php index 5ea2d0fc072..34deb112798 100644 --- a/apps/files_encryption/lib/helper.php +++ b/apps/files_encryption/lib/helper.php @@ -392,14 +392,10 @@ class Helper { * @return bool true if requirements are met */ public static function checkRequirements() { - $result = true; //openssl extension needs to be loaded - $result &= extension_loaded("openssl"); - // we need php >= 5.3.3 - $result &= version_compare(phpversion(), '5.3.3', '>='); + return extension_loaded("openssl"); - return (bool) $result; } /** From 1509dd1358561a2fb899e6a375c48c1030e2bb5f Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Thu, 4 Dec 2014 12:01:11 +0100 Subject: [PATCH 2/2] update error message --- apps/files_encryption/hooks/hooks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index d40e6b3d124..a6b7555b376 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -66,7 +66,7 @@ class Hooks { //check if all requirements are met if (!Helper::checkRequirements() || !Helper::checkConfiguration()) { $error_msg = $l->t("Missing requirements."); - $hint = $l->t('Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled.'); + $hint = $l->t('Please make sure that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled.'); \OC_App::disable('files_encryption'); \OCP\Util::writeLog('Encryption library', $error_msg . ' ' . $hint, \OCP\Util::ERROR); \OCP\Template::printErrorPage($error_msg, $hint);