From e6b3ad312b02b071857534cacb0c2866c3d030f9 Mon Sep 17 00:00:00 2001 From: Anton Fedurtsya Date: Fri, 10 Nov 2017 16:22:54 +0200 Subject: [PATCH] OXDEV-338 Fix config access in verification image generation --- core/utils/verificationimg.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/core/utils/verificationimg.php b/core/utils/verificationimg.php index b47a476..769931e 100644 --- a/core/utils/verificationimg.php +++ b/core/utils/verificationimg.php @@ -62,8 +62,6 @@ if (!function_exists('generateVerificationImg')) { if (!function_exists('strRem')) { - require_once getShopBasePath() . '/core/oxdecryptor.php'; - /** * OXID specific string manipulation method * @@ -73,10 +71,10 @@ if (!function_exists('strRem')) { */ function strRem($value) { - $decryptor = new oxDecryptor; - - $key = oxRegistry::getConfig()->getConfigParam('oecaptchakey'); + $decryptor = new \OxidEsales\Eshop\Core\Decryptor(); + $config = oxRegistry::getConfig(); + $key = $config->getConfigParam('oecaptchakey'); if (empty($key)) { $key = getOxConfKey(); } @@ -94,10 +92,9 @@ if (!function_exists('getOxConfKey')) { */ function getOxConfKey() { - $fileName = getShopBasePath() . '/core/oxconfk.php'; - $configFile = new oxConfigFile($fileName); - - return $configFile->getVar("sConfigKey"); + $config = oxRegistry::getConfig(); + $configKey = $config->getConfigParam('sConfigKey') ?: \OxidEsales\Eshop\Core\Config::DEFAULT_CONFIG_KEY; + return $configKey; } }