* svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
preg_match_all('/\{%(([a-zA-Z0-9-_,]+)(=([^\}]+)){0,1})*%\}/', $code, $matches);
//* DEBUG: */ print('<pre>'.print_r($matches, true).'</pre>');
- // Default is from OUTPUT_HTML
+ // Default is from outputHtml()
$outputMode = getOutputMode();
// Some entries found?
if (function_exists($commandFunction)) {
// Prepare $matches, $key, $outputMode, etc.
$data = array(
- 'matches' => $matches,
- 'key' => $key,
- 'mode' => $outputMode,
- 'code' => $code,
- 'callback' => $callback
+ 'matches' => $matches,
+ 'key' => $key,
+ 'mode' => $outputMode,
+ 'code' => $code,
+ 'callback' => $callback,
+ 'extra_func' => $extraFunction
);
// Call it
$currWeek = date('W', time());
// Has it changed?
- if ((getConfig('last_week') != $currWeek) || (getConfig('DEBUG_WEEKLY') == 'Y')) {
+ if ((getConfig('last_week') != $currWeek) || ((isConfigEntrySet('DEBUG_WEEKLY')) && (getConfig('DEBUG_WEEKLY') == 'Y'))) {
// Include weekly reset scripts
mergeIncludePool('reset', getArrayFromDirectory('inc/weekly/', 'weekly_'));
// Update config
- if ((isConfigEntrySet('DEBUG_WEEKLY')) && (getConfig('DEBUG_WEEKLY') != 'Y')) updateConfiguration('last_week', $currWeek);
+ if ((!isConfigEntrySet('DEBUG_WEEKLY')) || (getConfig('DEBUG_WEEKLY') != 'Y')) updateConfiguration('last_week', $currWeek);
} // END - if
// Create current month mark
$currMonth = date('m', time());
// Has it changed?
- if ((getConfig('last_month') != $currMonth) || (getConfig('DEBUG_MONTHLY') == 'Y')) {
+ if ((getConfig('last_month') != $currMonth) || ((isConfigEntrySet('DEBUG_MONTHLY')) && (getConfig('DEBUG_MONTHLY') == 'Y'))) {
// Include monthly reset scripts
mergeIncludePool('reset', getArrayFromDirectory('inc/monthly/', 'monthly_'));
// Update config
- if ((isConfigEntrySet('DEBUG_MONTHLY')) && (getConfig('DEBUG_MONTHLY') != 'Y')) updateConfiguration('last_month', $currMonth);
+ if ((!isConfigEntrySet('DEBUG_MONTHLY')) || (getConfig('DEBUG_MONTHLY') != 'Y')) updateConfiguration('last_month', $currMonth);
} // END - if
} // END - if