./beg.php:165: // @TODO Opps, what is missing here???
./birthday_confirm.php:95: // @TODO Try to rewrite the following unset()
./inc/autopurge/purge-inact.php:57: // @TODO Rewrite these if() blocks to a filter
-./inc/cache/config-local.php:126:// @TODO Rewrite the following three constants, somehow...
./inc/classes/cachesystem.class.php:474: // @TODO Add support for more types which break in last else-block
./inc/config-functions.php:141: // @TODO Make this all better... :-/
./inc/expression-functions.php:166:// @TODO FILTER_COMPILE_CONFIG does not handle call-back functions so we handle it here again
./inc/extensions-functions.php:434:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) )
./inc/extensions-functions.php:564: // @TODO Extension is loaded, what next?
./inc/functions.php:112: // @TODO Extension 'msg' does not exist
-./inc/functions.php:1499: // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
-./inc/functions.php:1522: // @TODO Rewrite this old lost code to a template
-./inc/functions.php:1590: // @TODO Are these convertions still required?
-./inc/functions.php:1608:// @TODO Rewrite this function to use readFromFile() and writeToFile()
+./inc/functions.php:1496: // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
+./inc/functions.php:1519: // @TODO Rewrite this old lost code to a template
+./inc/functions.php:1587: // @TODO Are these convertions still required?
+./inc/functions.php:1605:// @TODO Rewrite this function to use readFromFile() and writeToFile()
./inc/functions.php:181:// @TODO Rewrite this to an extension 'smtp'
-./inc/functions.php:2264: // @TODO This is still very static, rewrite it somehow
+./inc/functions.php:2263: // @TODO This is still very static, rewrite it somehow
./inc/gen_sql_patches.php:96:// @TODO Rewrite this to a filter
./inc/install-functions.php:59: // @TODO DEACTIVATED: changeDataInFile(getCachePath() . 'config-local.php', 'OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestParameter('omode'), 0);
./inc/language/de.php:1116:// @TODO Rewrite these two constants
// One day
setConfigEntry('ONE_DAY', (60*60*24));
-// Current date
-setConfigEntry('CURRENT_DATE', generateDateTime(time(), 3));
-
// Timestamp for yesterday, today ... all at 00:00 am
setConfigEntry('START_YDAY', makeTime(0, 0, 0, time() - getConfig('ONE_DAY')));
setConfigEntry('START_TDAY', makeTime(0, 0, 0, time()));
} // END - if
// Load the extension and maybe found language and function files.
-function loadExtension ($ext_name, $ext_mode, $ext_ver = '', $dry_run = false) {
- // If this happens twice, we need the bug report from you, except for updates/tests
+function loadExtension ($ext_name, $ext_mode, $ext_ver = '0.0', $dry_run = false) {
+ // Loading an extension in same mode, but not test/update, twice is not
+ // good, so is the extension $ext_name already loaded in mode $ext_mode?
if ((isset($GLOBALS['loaded_extension'][$ext_name][$ext_mode])) && (!in_array($ext_mode, array('update', 'test')))) {
+ // If this happens twice, we need the bug report from you, except for updates/tests
debug_report_bug(__FUNCTION__, __LINE__, '() is called twice: ext_name=' . $ext_name . ', ext_mode='. $ext_mode . ',ext_sqls=' . print_r(getExtensionSqls(), true) . ', ext_register_running=' . print_r($GLOBALS['ext_register_running'], true) . ', ext_running_updates=' . print_r($GLOBALS['ext_running_updates'], true));
} // END - if
// In all but test-mode we need these messages to debug! Please report all (together, e.g.)
if (($ext_mode != 'test') && (getCurrentExtensionVersion() == '0.0')) {
- // Log empty versions not in test-mode, but maybe it is fine...
- logDebugMessage(__FUNCTION__, __LINE__, 'Extension version is empty, setting to 0.0. ext_name=' . $ext_name . ', ext_mode=' . $ext_mode . ', dry_run=' . intval($dry_run));
+ // Abort here, this must now always be set!
+ debug_report_bug(__FUNCTION__, __LINE__, 'Extension version is empty, setting to 0.0. ext_name=' . $ext_name . ', ext_mode=' . $ext_mode . ', dry_run=' . intval($dry_run));
} // END - if
}
registerFilter('init', 'INIT_RANDOMIZER');
registerFilter('init', 'LOAD_RUNTIME_INCLUDES');
registerFilter('init', 'INIT_EXTENSIONS');
+ registerFilter('init', 'SET_CURRENT_DATE');
registerFilter('init', 'INIT_RANDOM_NUMBER');
registerFilter('init', 'CHECK_SVN_REVISION');
registerFilter('init', 'RUN_DAILY_RESET');
} // END - if
}
+// Filter for setting CURRENT_DATE, this is required after initialization of extensions
+function FILTER_SET_CURRENT_DATE () {
+ // Set current date
+ setConfigEntry('CURRENT_DATE', generateDateTime(time(), '3'));
+}
+
// [EOF]
?>
// Clear own output buffer
$GLOBALS['output'] = '';
- // Set header
- setHttpStatus('302 Found');
-
// Load URL when headers are not sent
sendRawRedirect(doFinalCompilation(str_replace('&', '&', $URL), false));
} else {
// Setter for member id
function setMemberId ($memberid) {
// We should not set member id to zero
- if ($memberid == '0') debug_report_bug(__FUNCTION__, __LINE__, 'Userid should not be set zero.');
+ if ($memberid == '0') {
+ debug_report_bug(__FUNCTION__, __LINE__, 'Userid should not be set zero.');
+ } // END - if
// Set it secured
$GLOBALS['member_id'] = bigintval($memberid);
// Load the include
loadIncludeOnce('inc/' . $inc . '.php');
} // END - foreach
+
+ // Check wether we are in installation routine
+ if ((!isInstalling()) && (!isCssOutputMode()) && (!isRawOutputMode())) {
+ // Redirect to the URL
+ redirectToUrl('install.php');
+ } // END - if
}
// Handle fatal errors
* @access private
*/
function sendRawRedirect ($url) {
+ // Send helping header
+ setHttpStatus('302 Found');
+
// always close the session
session_write_close();