X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Ffunctions.php;h=6e3cda3de9dad272524e41e5964431122e6f1cbe;hb=9642d17a028f3e7fdc57fa12e5dbd7129f166816;hp=e0bee7f20cc894cd130df6c8081deb157cd1a9a1;hpb=8cd3d68a23aa285f2fe149698a46cf8b4e3ac0ca;p=mailer.git
diff --git a/inc/functions.php b/inc/functions.php
index e0bee7f20c..6e3cda3de9 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -45,7 +45,9 @@ if (!defined('__SECURITY')) {
// Output HTML code directly or 'render' it. You addionally switch the new-line character off
function outputHtml ($htmlCode, $newLine = true) {
// Init output
- if (!isset($GLOBALS['output'])) $GLOBALS['output'] = '';
+ if (!isset($GLOBALS['output'])) {
+ $GLOBALS['output'] = '';
+ } // END - if
// Transfer username
$username = getMessage('USERNAME_UNKNOWN');
@@ -95,11 +97,6 @@ function outputHtml ($htmlCode, $newLine = true) {
clearOutputBuffer();
} // END - if
- // Extension 'rewrite' installed?
- if ((isExtensionActive('rewrite')) && (getOutputMode() != 1)) {
- $GLOBALS['output'] = rewriteLinksInCode($GLOBALS['output']);
- } // END - if
-
// Send all HTTP headers
sendHttpHeaders();
@@ -109,11 +106,6 @@ function outputHtml ($htmlCode, $newLine = true) {
// Output code here, DO NOT REMOVE! ;-)
outputRawCode($GLOBALS['output']);
} elseif ((getConfig('OUTPUT_MODE') == 'render') && (!empty($GLOBALS['output']))) {
- // Rewrite links when rewrite extension is active
- if ((isExtensionActive('rewrite')) && (getOutputMode() != 1)) {
- $GLOBALS['output'] = rewriteLinksInCode($GLOBALS['output']);
- } // END - if
-
// Send all HTTP headers
sendHttpHeaders();
@@ -155,16 +147,17 @@ function compileFinalOutput () {
addPageHeaderFooter();
// Compile all out
- while (((strpos($GLOBALS['output'], '{--') !== false) || (strpos($GLOBALS['output'], '{!') !== false) || (strpos($GLOBALS['output'], '{?') !== false) || (strpos($GLOBALS['output'], '{%') !== false)) && ($cnt < 3)) {
+ while (((strpos($GLOBALS['output'], '{--') !== false) || (strpos($GLOBALS['output'], '{DQUOTE}') !== false) || (strpos($GLOBALS['output'], '{!') !== false) || (strpos($GLOBALS['output'], '{?') !== false) || (strpos($GLOBALS['output'], '{%') !== false)) && ($cnt < 3)) {
// Init common variables
$content = array();
$newContent = '';
// Compile it
//* DEBUG: */ print '
'.htmlentities($GLOBALS['output']).'
';
- $eval = '$newContent = "' . compileCode(escapeQuotes($GLOBALS['output'])) . '";';
+ $eval = '$newContent = "' . str_replace('{DQUOTE}', '"', compileCode(escapeQuotes($GLOBALS['output']))) . '";';
//* DEBUG: */ die(''.htmlentities($eval).'
');
eval($eval);
+ //* DEBUG: */ die(''.htmlentities($newContent).'
');
// Was that eval okay?
if (empty($newContent)) {
@@ -179,6 +172,11 @@ function compileFinalOutput () {
$cnt++;
} // END - while
+ // Extension 'rewrite' installed?
+ if ((isExtensionActive('rewrite')) && (getOutputMode() != 1)) {
+ $GLOBALS['output'] = rewriteLinksInCode($GLOBALS['output']);
+ } // END - if
+
// Compress it?
if (!empty($_SERVER['HTTP_ACCEPT_ENCODING']) && (strpos('gzip', $_SERVER['HTTP_ACCEPT_ENCODING']) !== null)) {
// Compress it for HTTP gzip
@@ -1169,30 +1167,30 @@ function addSelectionBox ($type, $default, $prefix = '', $id = '0', $class = 're
if ($type == 'yn') {
// This is a yes/no selection only!
- if ($id > 0) $prefix .= "[" . $id."]";
- $OUT .= "