X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Ffunctions.php;h=eb36b77d60840cef80982cc30d907c83fb9cbdd9;hb=01c643fbb3dabb7953a6e9646113eb5742ebe3be;hp=8928e602fa428c51ab064641ff281a61e17d5e90;hpb=bc2da429e6d78668152427b7b5310268453553d8;p=mailer.git
diff --git a/inc/functions.php b/inc/functions.php
index 8928e602fa..eb36b77d60 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -229,7 +229,6 @@ function addFatalMessage ($F, $L, $message, $extra = '') {
$GLOBALS['fatal_messages'][] = $message;
// Log fatal messages away
- debug_report_bug($message);
logDebugMessage($F, $L, 'Fatal error message: ' . $message);
}
@@ -427,12 +426,15 @@ function loadEmailTemplate ($template, $content = array(), $userid = '0') {
// 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
@@ -586,10 +588,10 @@ function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = '
if (isDebugModeEnabled()) {
// In debug mode we want to display the mail instead of sending it away so we can debug this part
outputHtml('
-Headers : ' . str_replace('<', '<', str_replace('>', '>', secureString(trim($mailHeader)))) . '
-To : ' . $toEmail . '
-Subject : ' . $subject . '
-Message : ' . $message . '
+Headers : ' . htmlentities(utf8_decode(trim($mailHeader))) . '
+To : ' . htmlentities(utf8_decode($toEmail)) . '
+Subject : ' . htmlentities(utf8_decode($subject)) . '
+Message : ' . htmlentities(utf8_decode($message)) . '
');
} elseif (($isHtml == 'Y') && (isExtensionActive('html_mail'))) {
// Send mail as HTML away
@@ -750,7 +752,7 @@ function translateYesNo ($yn) {
// Translates the "pool type" into human-readable
function translatePoolType ($type) {
// Default?type is unknown
- $translated = sprintf(getMessage('POOL_TYPE_UNKNOWN'), $type);
+ $translated = getMaskedMessage('POOL_TYPE_UNKNOWN', $type);
// Generate constant
$constName = sprintf("POOL_TYPE_%s", $type);
@@ -841,7 +843,7 @@ function translateUserStatus ($status) {
default:
logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status));
- $ret = sprintf(getMessage('UNKNOWN_STATUS'), $status);
+ $ret = getMaskedMessage('UNKNOWN_STATUS', $status);
break;
} // END - switch
@@ -1382,6 +1384,16 @@ function generateImageOrCode ($img_code, $headerSent = true) {
}
// Create selection box or array of splitted timestamp
function createTimeSelections ($timestamp, $prefix = '', $display = '', $align = 'center', $return_array=false) {
+ // Do not continue if ONE_DAY is absend
+ if (!isConfigEntrySet('ONE_DAY')) {
+ // And return the timestamp itself or empty array
+ if ($return_array === true) {
+ return array();
+ } else {
+ return $timestamp;
+ }
+ } // END - if
+
// Calculate 2-seconds timestamp
$stamp = round($timestamp);
//* DEBUG: */ print("*" . $stamp.'/' . $timestamp."*
");
@@ -1476,7 +1488,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
if (ereg('Y', $display) || (empty($display))) {
// Generate year selection
- $OUT .= " |