X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffunctions.php;h=66b0c63e190892a6e095c919f5eabb0edf6bed47;hp=320c774ce890aeec5c55e6b1ea4bd344273b5703;hb=8d70fd41c880ca61bafb47a69a6411c741c71dff;hpb=9e3656b7346cd7ba24f241f2e0378b9e4675acd3 diff --git a/inc/functions.php b/inc/functions.php index 320c774ce8..66b0c63e19 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -149,19 +149,21 @@ function sendHttpHeaders () { // Compiles the final output function compileFinalOutput () { // Init counter - $cnt = '0'; + $cnt = 0; // Add page header and footer addPageHeaderFooter(); // Compile all out - while (((strpos($GLOBALS['output'], '{--') > 0) || (strpos($GLOBALS['output'], '{!') > 0) || (strpos($GLOBALS['output'], '{?') > 0)) && ($cnt < 3)) { + while (((strpos($GLOBALS['output'], '{--') !== false) || (strpos($GLOBALS['output'], '{!') !== false) || (strpos($GLOBALS['output'], '{?') !== false) || (strpos($GLOBALS['output'], '{%') !== false)) && ($cnt < 3)) { // Init common variables $content = array(); $newContent = ''; // Compile it - $eval = "\$newContent = \"".compileCode(escapeQuotes($GLOBALS['output']))."\";"; + //* DEBUG: */ print '
'.htmlentities($GLOBALS['output']).'
'; + $eval = '$newContent = "' . compileCode(escapeQuotes($GLOBALS['output'])) . '";'; + //* DEBUG: */ die('
'.htmlentities($eval).'
'); eval($eval); // Was that eval okay? @@ -169,6 +171,8 @@ function compileFinalOutput () { // Something went wrong! debug_report_bug('Evaluation error:
' . linenumberCode($eval) . '
', false); } // END - if + + // Use it again $GLOBALS['output'] = $newContent; // Count round @@ -1197,7 +1201,7 @@ function addSelectionBox ($type, $default, $prefix = '', $id = '0', $class = 're $year = date('Y', time()); // Use configured min age or fixed? - if ((isExtensionActive('other')) && (getExtensionVersion('other') >= '0.2.1')) { + if (isExtensionInstalledAndNewer('order', '0.2.1')) { // Configured $startYear = $year - getConfig('min_age'); } else { @@ -1225,7 +1229,7 @@ function addSelectionBox ($type, $default, $prefix = '', $id = '0', $class = 're // Get current year and subtract the configured minimum age $OUT .= "\n"; // Calculate earliest year depending on extension version - if ((isExtensionActive('other')) && (getExtensionVersion('other') >= '0.2.1')) { + if (isExtensionInstalledAndNewer('order', '0.2.1')) { // Use configured minimum age $year = date('Y', time()) - getConfig('min_age'); } else { @@ -2107,7 +2111,7 @@ function generateEmailLink ($email, $table = 'admins') { if ((isExtensionActive('admins')) && ($table == 'admins')) { // Create email link for contacting admin in guest area $EMAIL = generateAdminEmailLink($email); - } elseif ((isExtensionActive('user')) && (getExtensionVersion('user') >= '0.3.3') && ($table == 'user_data')) { + } elseif ((isExtensionInstalledAndNewer('user', '0.3.3')) && ($table == 'user_data')) { // Create email link for contacting a member within admin area (or later in other areas, too?) $EMAIL = generateUserEmailLink($email, 'admin'); } elseif ((isExtensionActive('sponsor')) && ($table == 'sponsor_data')) { @@ -3081,7 +3085,7 @@ function determineReferalId () { } elseif ((isExtensionInstalledAndNewer('user', '0.3.4')) && (getConfig('select_user_zero_refid') == 'Y')) { // Select a random user which has confirmed enougth mails $GLOBALS['refid'] = determineRandomReferalId(); - } elseif ((isExtensionInstalled('sql_patches')) && (getConfig('def_refid') > 0)) { + } elseif ((isExtensionInstalledAndNewer('sql_patches', '0.1.2')) && (getConfig('def_refid') > 0)) { // Set default refid as refid in URL $GLOBALS['refid'] = getConfig('def_refid'); } else { @@ -4009,4 +4013,3 @@ if (!function_exists('http_build_query')) { // [EOF] ?> -