From 4db79dc772aab6f1e33c0bf55ea63e9e51d3ba04 Mon Sep 17 00:00:00 2001 From: rMalie Date: Thu, 22 Dec 2011 22:21:11 +0000 Subject: [PATCH] // Fix PS_CIPHER_ALGORITHM in new install --- install-new/models/install.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install-new/models/install.php b/install-new/models/install.php index 0fa047ba7..a6454ce3c 100644 --- a/install-new/models/install.php +++ b/install-new/models/install.php @@ -67,6 +67,10 @@ class InstallModelInstall extends InstallAbstractModel return false; } + // If no mcrypt, do not use RIJNDAEL algorithm + if (!function_exists('mcrypt')) + Configuration::updateGlobalValue('PS_CIPHER_ALGORITHM', 0); + return true; } @@ -112,8 +116,6 @@ class InstallModelInstall extends InstallAbstractModel $settings_constants['_RIJNDAEL_KEY_'] = Tools::passwdGen(mcrypt_get_key_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB)); $settings_constants['_RIJNDAEL_IV_'] = base64_encode(mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_RAND)); } - else - Configuration::updateGlobalValue('PS_CIPHER_ALGORITHM', 0); $settings_content = " $value)