X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffilters.php;h=8970f8ea32a71dcd71a9f1ce51849a45709502db;hp=d18c91e74191d8a4fa2e264f7635c50fb8bcdab4;hb=4cec044b57773e28423261c71f918f3e22ca8a75;hpb=735545e765720a954a345bc068239e2fffa0dbe1 diff --git a/inc/filters.php b/inc/filters.php index d18c91e741..8970f8ea32 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -1,7 +1,7 @@ 0) { // Then find all updates we shall no longer execute - foreach (getExtensionUpdateDependencies() as $id=>$ext_name) { + foreach (getExtensionUpdateDependencies() as $id => $ext_name) { // Shall we remove this update? if (in_array($ext_name, getExtensionRemovalList())) { // Then remove this extension! @@ -423,7 +423,7 @@ function FILTER_COMPILE_CONFIG ($code, $compiled = false) { // Use this for replacing $code = str_replace($match, $GLOBALS['compile_config'][$matches[1][$key]], $code); - //* DEBUG: */ if (($match == '{?URL?}') && (strlen($code) > 10000)) die('
'.htmlentities($code).'
'); + //* DEBUG: */ if (($match == '{?URL?}') && (strlen($code) > 10000)) die('
'.secureString($code).'
'); } // END - foreach } // END - if @@ -434,7 +434,9 @@ function FILTER_COMPILE_CONFIG ($code, $compiled = false) { // Should we compile it? if ($compiled === true) { // Run the code - eval("\$GLOBALS['compiled_config'][\$uncompiled] = \"" . $GLOBALS['compiled_config'][$uncompiled] . "\";"); + $eval = "\$GLOBALS['compiled_config'][\$uncompiled] = \"" . $GLOBALS['compiled_config'][$uncompiled] . "\";"; + //* DEBUG: */ print '
' . str_replace('$', '$', htmlentities($eval)) . '
'; + eval($eval); } // END - if // Return compiled code @@ -473,7 +475,7 @@ function FILTER_COMPILE_EXTENSION ($code) { } // END - if // Return compiled code - //* DEBUG: */ die('
'.htmlentities($code).'
'); + //* DEBUG: */ die('
'.secureString($code).'
'); return $code; } @@ -591,9 +593,12 @@ function FILTER_DETERMINE_WHAT_ACTION () { if (isGetRequestElementSet('module')) { // Set module from request setModule(getRequestElement('module')); - } else { + } elseif (getOutputMode() == '0') { // Set default module 'index' setModule('index'); + } else { + // Unknown module + setModule('unknown'); } } // END - if @@ -845,10 +850,13 @@ function FILTER_DISPLAY_PARSING_TIME () { // Filter for flushing template cache function FILTER_FLUSH_TEMPLATE_CACHE () { + // Do not flush when debugging the template cache + if (isDebuggingTemplateCache()) return; + // Do we have cached eval() data? if ((isset($GLOBALS['template_eval'])) && (count($GLOBALS['template_eval']) > 0)) { // Now flush all - foreach ($GLOBALS['template_eval'] as $template=>$eval) { + foreach ($GLOBALS['template_eval'] as $template => $eval) { // Flush the cache (if not yet found) flushTemplateCache($template, $eval); } // END - if