$GLOBALS['fatal_messages'][] = $message;
// Log fatal messages away
- debug_report_bug($message);
logDebugMessage($F, $L, 'Fatal error message: ' . $message);
}
// Is content an array?
if (is_array($content)) {
// Add expiration to array
- if (getConfig('auto_purge') == '0') {
+ if ((isConfigEntrySet('auto_purge')) && (getConfig('auto_purge') == '0')) {
// Will never expire!
$content['expiration'] = getMessage('MAIL_WILL_NEVER_EXPIRE');
- } else {
+ } elseif (isConfigEntrySet('auto_purge')) {
// Create nice date string
$content['expiration'] = createFancyTime(getConfig('auto_purge'));
+ } else {
+ // Missing entry
+ $content['expiration'] = getMessage('MAIL_NO_CONFIG_AUTO_PURGE');
}
} // END - if
$debug .= "Thank you for finding bugs.";
// Send an email? (e.g. not wanted for evaluation errors)
- if ($sendEmail === true) {
+ if (($sendEmail === true) && (!isInstallationPhase())) {
// Prepare content
$content = array(
'message' => trim($message),
// Call the filter chain 'shutdown'
runFilterChain('shutdown', null);
- if (SQL_IS_LINK_UP()) {
+ // Check if not in installation phase and the link is up
+ if ((!isInstallationPhase()) && (SQL_IS_LINK_UP())) {
// Close link
SQL_CLOSE(__FILE__, __LINE__);
} elseif (!isInstallationPhase()) {
if (strpos($url, session_name()) !== false) return $url;
// Do we have a valid session?
- if ((($GLOBALS['valid_session'] === false) || (!isset($_COOKIE[session_name()]))) && (isSpider() === false)) {
+ if (((!isset($GLOBALS['valid_session'])) || ($GLOBALS['valid_session'] === false) || (!isset($_COOKIE[session_name()]))) && (isSpider() === false)) {
// Invalid session
// Determine right seperator
$seperator = '&';
// Read the file
$fileContent = readFromFile($FQFN, true);
- // Compile all config entries (we use a filter here, yes...)
- $fileContent = FILTER_COMPILE_CONFIG($fileContent);
-
// Split it up against ";\n" and merge it into existing SQLs
mergeSqls(explode(";\n", $fileContent), 'install');
} else {
'ADMIN_REMOVE_STATS_ENTRY' => "Hier klicken, um Mitgliederstatistik zu entfernen.",
'ADMIN_USER_STATS_REMOVED' => "Mitgliederstatistiken entfernt.",
'MAIL_WILL_NEVER_EXPIRE' => "Bestätigungslink verfaellt nicht.",
+ 'MAIL_NO_CONFIG_AUTO_PURGE' => "Konfigurationseintrag 'auto_purge' fehlt.",
'MEMBER_ENTER_MORE_RECEIVERS' => "Geben Sie mindestens ein Empfänger ein.",
'MEMBER_NO_MORE_RECEIVERS_FOUND' => "Es konnten nicht ausreichend genug empfangsbereite Mitglieder gefunden werden.",
'ADMIN_USER_PROFILE_TITLE' => "Mitgliedsprofil aufrufen",
// Get admin's id
$adminId = getCurrentAdminId();
- $salt = substr(getAdminHash($adminId), 0, -40);
+ $salt = substr(getAdminHash(getAdminLogin($adminId)), 0, -40);
// Rewrite cookie when it's own account
if ($adminId == $id) {
// Set output mode here
setConfigEntry('OUTPUT_MODE', 'render');
-} else {
- // Redirect to install.php
- redirectToUrl('install.php');
}
// Check if the user setups his MySQL stuff...
-if ((empty($GLOBALS['mysql']['login'])) && (!isInstalling()) && (!isGetRequestElementSet('installing')) && (isInstalled())) {
+if ((empty($GLOBALS['mysql']['login'])) && (!isInstalling()) && (!isInstallationPhase()) && (!isGetRequestElementSet('installing')) && (isInstalled())) {
// No login entered and outside installation mode
outputHtml('<strong>{--LANG_WARNING--}:</strong>');
if (isInstalled()) {
// Please run the installation script (maybe again)
app_die(__FILE__, __LINE__, '{--DIE_RUN_INSTALL_MYSQL--}');
}
-} elseif ((!isInstalling()) && (empty($GLOBALS['mysql']['password'])) && (getConfig('WARN_NO_PASS') == 'Y')) {
+} elseif ((!isInstalling()) && (!isInstallationPhase()) && (empty($GLOBALS['mysql']['password'])) && (getConfig('WARN_NO_PASS') == 'Y')) {
// No database password entered!!!
loadTemplate('admin_settings_saved', false, '<div>{--LANG_WARNING--}:</div> {--WARN_NULL_PASSWORD--}');
}
// Init message system
initMessages();
-// Check if this file is writeable or read-only and warn the user
-if (!isInstalling()) {
+// Are we in installation phase?
+if ((!isInstalling()) && (!isInstallationPhase())) {
// Load configuration file(s) here
loadIncludeOnce('inc/load_config.php');
// Load config
loadIncludeOnce('inc/load_config.php');
+ // Init filter system here
+ initFilterSystem();
+
// Are we installation routine?
if ((!isInstalling()) && (getOutputMode() != 1) && (getOutputMode() != -1)) {
// You have to install first!
redirectToUrl('install.php');
} // END - if
- // Init filter system here
- initFilterSystem();
-
// Load cache
loadIncludeOnce('inc/load_cache.php');
incrementStatsEntry('cache_hits');
} elseif (!isExtensionActive('cache')) {
// Load from database
- $result = SQL_QUERY_ESC("SELECT `password` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT `password` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `login`='%s' LIMIT 1",
array($admin), __FUNCTION__, __LINE__);
// Do we have an entry?
// Filter for flushing statistics
function FILTER_FLUSH_STATS () {
// Now do we have stats?
- if ((isset($GLOBALS['stats'])) && (getConfig('STATS_ENABLED') == 'Y')) {
+ if ((isset($GLOBALS['stats'])) && (!isInstallationPhase()) && (getConfig('STATS_ENABLED') == 'Y')) {
// Write statistics to temporary table
writeStatsTable();
} // END - if
foreach ($GLOBALS['header'] as $header) {
header($header);
} // END - foreach
+
+ // Mark them as flushed
+ $GLOBALS['header'] = array();
}
// Wrapper function for chmod()