From 6b09b7acfe748ff6fdf3904026c187cfe9648ed4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 20 Jun 2010 23:39:06 +0000 Subject: [PATCH] Further fixes for wrong getMaskedMessage() usage in 'compiled' code --- inc/expression-functions.php | 2 +- inc/functions.php | 4 ++-- inc/modules/guest/what-register.php | 8 +++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/inc/expression-functions.php b/inc/expression-functions.php index c114e31773..e112a20bf3 100644 --- a/inc/expression-functions.php +++ b/inc/expression-functions.php @@ -221,7 +221,7 @@ function doExpressionValidatorLinks ($data) { // Expression call-back for dynamic messages function doExpressionMessage ($data) { // Message string replacement depends on if message is masked - if (isMessageMasked($data['callback'])) { + if ((isMessageMasked($data['callback'])) && ((!empty($data['extra_func'])) || ($data['extra_func'] == '0'))) { // Message should be masked $replacer = "{DQUOTE} . getMaskedMessage('" . $data['callback'] . "', '" . $data['extra_func'] . "') . {DQUOTE}"; } else { diff --git a/inc/functions.php b/inc/functions.php index 7fb03af448..5e7d2962d2 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -171,7 +171,7 @@ function compileFinalOutput () { // Main compilation loop function doFinalCompilation ($code, $insertComments = true) { - // Insert comments? + // Insert comments? (Only valid with HTML templates, of course) enableTemplateHtml($insertComments); // Init counter @@ -186,7 +186,7 @@ function doFinalCompilation ($code, $insertComments = true) { // Compile it //* DEBUG: */ print '
'.htmlentities($code).'
'; $eval = '$newContent = "' . str_replace('{DQUOTE}', '"', compileCode(escapeQuotes($code))) . '";'; - //* DEBUG: */ die('
'.htmlentities($eval).'
'); + //* DEBUG: */ if ($insertComments) die('
'.linenumberCode($eval).'
'); eval($eval); //* DEBUG: */ die('
'.htmlentities($newContent).'
'); diff --git a/inc/modules/guest/what-register.php b/inc/modules/guest/what-register.php index 590e4b9793..6585515537 100644 --- a/inc/modules/guest/what-register.php +++ b/inc/modules/guest/what-register.php @@ -147,12 +147,14 @@ if ((isFormSent()) && (isRegistrationDataComplete())) { $content['city'] = SQL_ESCAPE(postRequestParameter('city')); $content['email'] = SQL_ESCAPE(postRequestParameter('email')); - // Prepare country selection box - $OUT = "'; $OUT .= generateOptionList('countries', 'id', 'descr', postRequestParameter('country_code'), 'code', $whereStatement); - $OUT .= ""; + $OUT .= ''; $content['country'] = $OUT; // Set must-fillout fields -- 2.39.5