Merge pull request #12610 from owncloud/remove_php_version_check

[encryption] remove check for PHP version
remotes/origin/fix-10825
Björn Schießle 12 years ago
commit c2b71d955c
  1. 2
      apps/files_encryption/hooks/hooks.php
  2. 6
      apps/files_encryption/lib/helper.php

@ -66,7 +66,7 @@ class Hooks {
//check if all requirements are met //check if all requirements are met
if (!Helper::checkRequirements() || !Helper::checkConfiguration()) { if (!Helper::checkRequirements() || !Helper::checkConfiguration()) {
$error_msg = $l->t("Missing requirements."); $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'); \OC_App::disable('files_encryption');
\OCP\Util::writeLog('Encryption library', $error_msg . ' ' . $hint, \OCP\Util::ERROR); \OCP\Util::writeLog('Encryption library', $error_msg . ' ' . $hint, \OCP\Util::ERROR);
\OCP\Template::printErrorPage($error_msg, $hint); \OCP\Template::printErrorPage($error_msg, $hint);

@ -392,14 +392,10 @@ class Helper {
* @return bool true if requirements are met * @return bool true if requirements are met
*/ */
public static function checkRequirements() { public static function checkRequirements() {
$result = true;
//openssl extension needs to be loaded //openssl extension needs to be loaded
$result &= extension_loaded("openssl"); return extension_loaded("openssl");
// we need php >= 5.3.3
$result &= version_compare(phpversion(), '5.3.3', '>=');
return (bool) $result;
} }
/** /**

Loading…
Cancel
Save