X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffunctions.php;h=2052e4af838925ea3679260c79f57d2d0d5e4329;hp=06c06212fcc279089f179c7bf6d2fc7ca37d6f16;hb=263a089d8a499e0e26d0af9e7aa7639f88b8ca60;hpb=481c2f9be33eaf1565217b12b3a90b75b5a52ecd diff --git a/inc/functions.php b/inc/functions.php index 06c06212fc..2052e4af83 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1,7 +1,7 @@ 6) || (empty($img_code)) || (getConfig('code_length') == '0')) { - // Stop execution of function here because of over-sized code length + // Stop2 execution of function here because of over-sized code length debug_report_bug('img_code ' . $img_code .' has invalid length. img_code()=' . strlen($img_code) . ' code_length=' . getConfig('code_length')); } elseif ($headerSent === false) { // Return an HTML code here @@ -1454,35 +1454,35 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align = } else { // Generate table $OUT = "
\n"; - $OUT .= "\n"; + $OUT .= "
\n"; $OUT .= "\n"; if (ereg('Y', $display) || (empty($display))) { - $OUT .= " \n"; + $OUT .= " \n"; } if (ereg('M', $display) || (empty($display))) { - $OUT .= " \n"; + $OUT .= " \n"; } - if (ereg("W", $display) || (empty($display))) { - $OUT .= " \n"; + if (ereg('W', $display) || (empty($display))) { + $OUT .= " \n"; } - if (ereg("D", $display) || (empty($display))) { - $OUT .= " \n"; + if (ereg('D', $display) || (empty($display))) { + $OUT .= " \n"; } - if (ereg("h", $display) || (empty($display))) { - $OUT .= " \n"; + if (ereg('h', $display) || (empty($display))) { + $OUT .= " \n"; } if (ereg('m', $display) || (empty($display))) { - $OUT .= " \n"; + $OUT .= " \n"; } - if (ereg("s", $display) || (empty($display))) { - $OUT .= " \n"; + if (ereg('s', $display) || (empty($display))) { + $OUT .= " \n"; } $OUT .= "\n"; @@ -1498,7 +1498,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align = } $OUT .= " \n"; } else { - $OUT .= "\n"; + $OUT .= "\n"; } if (ereg('M', $display) || (empty($display))) { @@ -1512,10 +1512,10 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align = } $OUT .= " \n"; } else { - $OUT .= "\n"; + $OUT .= "\n"; } - if (ereg("W", $display) || (empty($display))) { + if (ereg('W', $display) || (empty($display))) { // Generate week selection $OUT .= " \n"; } else { - $OUT .= "\n"; + $OUT .= "\n"; } - if (ereg("D", $display) || (empty($display))) { + if (ereg('D', $display) || (empty($display))) { // Generate day selection $OUT .= " \n"; } else { - $OUT .= "\n"; + $OUT .= "\n"; } - if (ereg("h", $display) || (empty($display))) { + if (ereg('h', $display) || (empty($display))) { // Generate hour selection $OUT .= " \n"; } else { - $OUT .= "\n"; + $OUT .= "\n"; } if (ereg('m', $display) || (empty($display))) { @@ -1564,10 +1564,10 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align = } $OUT .= " \n"; } else { - $OUT .= "\n"; + $OUT .= "\n"; } - if (ereg("s", $display) || (empty($display))) { + if (ereg('s', $display) || (empty($display))) { // Generate second selection $OUT .= " \n"; } else { - $OUT .= "\n"; + $OUT .= "\n"; } $OUT .= "\n"; $OUT .= "
{--_YEARS--}
{--_YEARS--}
{--_MONTHS--}
{--_MONTHS--}
{--_WEEKS--}
{--_WEEKS--}
{--_DAYS--}
{--_DAYS--}
{--_HOURS--}
{--_HOURS--}
{--_MINUTES--}
{--_MINUTES--}
{--_SECONDS--}
{--_SECONDS--}
\n"; @@ -2028,7 +2028,7 @@ function generateHash ($plainText, $salt = '') { // Do we miss an arry element here? if (!isConfigEntrySet('file_hash')) { - // Stop here + // Stop2 here debug_report_bug('Missing file_hash in ' . __FUNCTION__ . '.'); } // END - if @@ -2366,7 +2366,7 @@ function getThemeId ($name) { // Count up incrementStatsEntry('cache_hits'); - } elseif (getExtensionVersion('cache') != '0.1.8') { + } elseif (isExtensionInstalledAndNewer('cache', '0.1.8')) { // Check if current theme is already imported or not $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_themes` WHERE `theme_path`='%s' LIMIT 1", array($name), __FUNCTION__, __LINE__); @@ -3192,7 +3192,7 @@ function determineReferalId () { } // Is the record valid? - if (($found === false) || (!isUserDataValid())) { + if ((($found === false) || (!isUserDataValid())) && (isConfigEntrySet('def_refid'))) { // No, then reset referal id $GLOBALS['refid'] = getConfig('def_refid'); } // END - if @@ -3227,7 +3227,7 @@ function shutdown () { addFatalMessage(__FILE__, __LINE__, getMessage('NO_DB_LINK_SHUTDOWN')); } - // Stop executing here + // Stop2 executing here exit; } @@ -3656,7 +3656,7 @@ function isTemplateCached ($template) { // Flushes non-flushed template cache to disk function flushTemplateCache ($template, $eval) { // Is this cache flushed? - if ((!isTemplateCached($template)) && ($eval != '404')) { + if ((isDebuggingTemplateCache() === false) && (isTemplateCached($template) === false) && ($eval != '404')) { // Generate FQFN $FQFN = sprintf("%s_compiled/templates/%s.tpl.cache", getConfig('CACHE_PATH'), $template); @@ -3671,7 +3671,7 @@ function flushTemplateCache ($template, $eval) { // Reads a template cache function readTemplateCache ($template) { // Check it again - if (isTemplateCached($template)) { + if ((isDebuggingTemplateCache() === false) && (isTemplateCached($template))) { // Generate FQFN $FQFN = sprintf("%s_compiled/templates/%s.tpl.cache", getConfig('CACHE_PATH'), $template);