From 5375b5f32f309a426ff7bc9c928f526ba0139e19 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 24 Feb 2009 14:49:46 +0000 Subject: [PATCH] Some getConfig() rewritten to isConfigEntrySet() --- inc/functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index f7c7e5be09..0f206df6d0 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1245,10 +1245,10 @@ function GEN_RANDOM_CODE ($length, $code, $uid, $DATA="") { // Build key string $keys = constant('SITE_KEY').":".constant('DATE_KEY'); - if (getConfig('secret_key') != null) $keys .= ":".getConfig('secret_key'); - if (getConfig('file_hash') != null) $keys .= ":".getConfig('file_hash'); + if (isConfigEntrySet('secret_key')) $keys .= ":".getConfig('secret_key'); + if (isConfigEntrySet('file_hash')) $keys .= ":".getConfig('file_hash'); $keys .= ":".date("d-m-Y (l-F-T)", bigintval(getConfig('patch_ctime'))); - if (getConfig('master_salt') != null) $keys .= ":".getConfig('master_salt'); + if (isConfigEntrySet('master_salt')) $keys .= ":".getConfig('master_salt'); // Build string from misc data $data = $code.":".$uid.":".$DATA; @@ -1263,7 +1263,7 @@ function GEN_RANDOM_CODE ($length, $code, $uid, $DATA="") { // Calculate number for generating the code $a = $code + constant('_ADD') - 1; - if (getConfig('master_hash') != null) { + if (isConfigEntrySet('master_hash')) { // Generate hash with master salt from modula of number with the prime number and other data $saltedHash = generateHash(($a % constant('_PRIME')).":".$server.":".$keys.":".$data.":".date("d-m-Y (l-F-T)", time()).":".$a, getConfig('master_salt')); -- 2.39.5