X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Ftemplate-functions.php;h=474a86baf0885cbcfce5f6bad0c3de1e2a7d2dda;hb=6ab597cf6eeb82241f57ca7d13871338dbb9bcaa;hp=c05eb5d06247b10892638aacacc58c9e17e1904a;hpb=839c74c5882de11b95046f6bca0ea0e02ea139c8;p=mailer.git diff --git a/inc/template-functions.php b/inc/template-functions.php index c05eb5d062..474a86baf0 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -180,6 +180,15 @@ function outputHtml ($htmlCode = NULL, $newLine = TRUE) { // Compiles the final output function compileFinalOutput () { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, '__output(length)=' . strlen($GLOBALS['__output']) . ',getScriptOutputMode()=' . getScriptOutputMode() . ' - ENTERED!'); + // Is this function called? + if (isset($GLOBALS[__FUNCTION__])) { + // Abort here + reportBug(__FUNCTION__, __LINE__, 'Double call of ' . __FUNCTION__ . ' causes problems with sent headers.'); + } // END - if + + // Mark this function as called + $GLOBALS[__FUNCTION__] = TRUE; + // Add page header and footer addPageHeaderFooter(); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, '__output(length)=' . strlen($GLOBALS['__output']) . ' - After addPageHeaderFooter() call.'); @@ -262,8 +271,9 @@ function doFinalCompilation ($code, $insertComments = TRUE, $enableCodes = TRUE) } // END - while // Add debugging data in HTML code, if mode is enabled - if ((isDebugModeEnabled()) && ($insertComments === TRUE) && ((isHtmlOutputMode()) || (isCssOutputMode()))) { + if ((isDebugModeEnabled()) && ($insertComments === TRUE) && (isHtmlOutputMode())) { // Add loop count + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isDebugModeEnabled()=' . intval(isDebugModeEnabled()) . ',insertComments=' . intval($insertComments) . ',isHtmlOutputMode()=' . intval(isHtmlOutputMode())); $code .= ''; } // END - if @@ -606,7 +616,7 @@ function getMenuCssClasses ($data) { // Generate XHTML code for the CAPTCHA function generateCaptchaCode ($code, $type, $urlId, $userid) { - return 'Code ' . $code . ''; + return 'Code ' . $code . ''; } // Compiles the given HTML/mail code @@ -754,39 +764,23 @@ function compileRawCode ($code, $full = TRUE, $compileCode = TRUE) { } // -function addSelectionBox ($type, $default, $prefix = '', $id = '0', $class = 'form_select') { +function addSelectionBox ($type, $default, $prefix = '', $id = NULL, $class = 'form_select') { $OUT = ''; if ($type == 'yn') { // This is a yes/no selection only! - if ($id > 0) $prefix .= '[' . $id . ']'; + if (isValidId($id)) $prefix .= '[' . $id . ']'; $OUT .= ''; } switch ($type) { - case 'day': // Day - for ($idx = 1; $idx < 32; $idx++) { - $OUT .= ''; - // Calculate earliest year depending on extension version - if (isExtensionInstalledAndNewer('other', '0.2.1')) { - // Use configured minimum age - $year = getYear() - getConfig('min_age'); - } else { - // Use fixed 16 years age - $year = getYear() - 16; - } // Construct year selection list - for ($idx = $minYear; $idx <= $year; $idx++) { + for ($idx = $minYear; $idx <= $startYear; $idx++) { $OUT .= '