From feb187d8f8a4dfe861ccece329260b9e186a6851 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 27 Oct 2009 20:25:19 +0000 Subject: [PATCH] Fix for DEFAULT_SALT_LENGTH --- inc/config-functions.php | 1 + inc/filters.php | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/inc/config-functions.php b/inc/config-functions.php index d7c27d8171..02563b9935 100644 --- a/inc/config-functions.php +++ b/inc/config-functions.php @@ -60,6 +60,7 @@ function initConfig () { 'ADMIN_REGISTERED' => 'N', 'MXCHANGE_INSTALLED' => 'N', 'DEFAULT_LANG' => 'de', + 'DEFAULT_SALT_LENGTH' => 40, 'DEBUG_MODE' => 'N', 'DEBUG_RESET' => 'N', 'DEBUG_MONTHLY' => 'N', diff --git a/inc/filters.php b/inc/filters.php index 1b26cddabb..2aed78b945 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -442,9 +442,15 @@ function FILTER_COMPILE_CONFIG ($code) { if (isConfigEntrySet($matches[1][$key])) { // Set it for caching $GLOBALS['compile_config'][$matches[1][$key]] = getConfig($matches[1][$key]); - } else { + } elseif (isConfigEntrySet('default_' . strtoupper($matches[1][$key]))) { + // Use default value + $GLOBALS['compile_config'][$matches[1][$key]] = getConfig('DEFAULT_' . strtoupper($matches[1][$key])); + } elseif (isMessageIdValid('DEFAULT_' . strtoupper($matches[1][$key]))) { // No config, try the language system $GLOBALS['compile_config'][$matches[1][$key]] = getMessage('DEFAULT_' . strtoupper($matches[1][$key])); + } else { + // Unhandled! + $GLOBALS['compile_config'][$matches[1][$key]] = '!' . $matches[1][$key] . '!'; } } // END - if -- 2.39.5