mirror of
https://git.d3data.de/3rdParty/captcha-module.git
synced 2025-04-26 07:41:36 +02:00
OXDEV-338 Fix config access in verification image generation
This commit is contained in:
parent
623bf060da
commit
e6b3ad312b
@ -62,8 +62,6 @@ if (!function_exists('generateVerificationImg')) {
|
|||||||
|
|
||||||
if (!function_exists('strRem')) {
|
if (!function_exists('strRem')) {
|
||||||
|
|
||||||
require_once getShopBasePath() . '/core/oxdecryptor.php';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* OXID specific string manipulation method
|
* OXID specific string manipulation method
|
||||||
*
|
*
|
||||||
@ -73,10 +71,10 @@ if (!function_exists('strRem')) {
|
|||||||
*/
|
*/
|
||||||
function strRem($value)
|
function strRem($value)
|
||||||
{
|
{
|
||||||
$decryptor = new oxDecryptor;
|
$decryptor = new \OxidEsales\Eshop\Core\Decryptor();
|
||||||
|
$config = oxRegistry::getConfig();
|
||||||
$key = oxRegistry::getConfig()->getConfigParam('oecaptchakey');
|
|
||||||
|
|
||||||
|
$key = $config->getConfigParam('oecaptchakey');
|
||||||
if (empty($key)) {
|
if (empty($key)) {
|
||||||
$key = getOxConfKey();
|
$key = getOxConfKey();
|
||||||
}
|
}
|
||||||
@ -94,10 +92,9 @@ if (!function_exists('getOxConfKey')) {
|
|||||||
*/
|
*/
|
||||||
function getOxConfKey()
|
function getOxConfKey()
|
||||||
{
|
{
|
||||||
$fileName = getShopBasePath() . '/core/oxconfk.php';
|
$config = oxRegistry::getConfig();
|
||||||
$configFile = new oxConfigFile($fileName);
|
$configKey = $config->getConfigParam('sConfigKey') ?: \OxidEsales\Eshop\Core\Config::DEFAULT_CONFIG_KEY;
|
||||||
|
return $configKey;
|
||||||
return $configFile->getVar("sConfigKey");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user