X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffunctions.php;h=ffdcd76a16eeb7907da966e0e3668550578750cd;hp=9a7bd4b48448560efd80dd2a97184b6fda57fcfd;hb=1cf72a9c1a5e737509af79d49f0731da2eb6a218;hpb=d5ee31ebfc85f22fc691b8c2753c42e188c1c4ef
diff --git a/inc/functions.php b/inc/functions.php
index 9a7bd4b484..ffdcd76a16 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -185,15 +185,17 @@ function OUTPUT_RAW ($HTML) {
function addFatalMessage ($message, $extra="") {
global $FATAL;
- if (empty($extra)) {
- // Regular text message to add to $FATAL
- $FATAL[] = $message;
- } else {
+ if (is_array($extra)) {
+ // Multiple extras for a message with masks
+ $message = call_user_func_array('sprintf', $extra);
+ } elseif (!empty($extra)) {
// $message is text with a mask plus extras to insert into the text
$message = sprintf($message, $extra);
- $FATAL[] = $message;
}
+ // Add message to $FATAL
+ $FATAL[] = $message;
+
// Log fatal messages away
DEBUG_LOG(__FUNCTION__, __LINE__, " message={$message}");
}
@@ -1403,31 +1405,31 @@ function CREATE_TIME_SELECTIONS ($timestamp, $prefix="", $display="", $align="ce
$OUT .= "
\n";
if (ereg('Y', $display) || (empty($display))) {
- $OUT .= " "._YEARS." | \n";
+ $OUT .= " {--_YEARS--} | \n";
}
if (ereg("M", $display) || (empty($display))) {
- $OUT .= " "._MONTHS." | \n";
+ $OUT .= " {--_MONTHS--} | \n";
}
if (ereg("W", $display) || (empty($display))) {
- $OUT .= " "._WEEKS." | \n";
+ $OUT .= " {--_WEEKS--} | \n";
}
if (ereg("D", $display) || (empty($display))) {
- $OUT .= " "._DAYS." | \n";
+ $OUT .= " {--_DAYS--} | \n";
}
if (ereg("h", $display) || (empty($display))) {
- $OUT .= " "._HOURS." | \n";
+ $OUT .= " {--_HOURS--} | \n";
}
if (ereg("m", $display) || (empty($display))) {
- $OUT .= " "._MINUTES." | \n";
+ $OUT .= " {--_MINUTES--} | \n";
}
if (ereg("s", $display) || (empty($display))) {
- $OUT .= " "._SECONDS." | \n";
+ $OUT .= " {--_SECONDS--} | \n";
}
$OUT .= "
\n";
@@ -1438,7 +1440,7 @@ function CREATE_TIME_SELECTIONS ($timestamp, $prefix="", $display="", $align="ce
$OUT .= " | \n";
@@ -1452,7 +1454,7 @@ function CREATE_TIME_SELECTIONS ($timestamp, $prefix="", $display="", $align="ce
for ($idx = 0; $idx <= 11; $idx++)
{
$OUT .= "