use no printf when not needed
This commit is contained in:
parent
ab2a8f860c
commit
48cc835ade
|
@ -76,8 +76,13 @@ function StatusMessage($MessageTyp,$MessageHeadline,$MessageText,$MessageVariabl
|
||||||
$MessageText = "<p " . $class . ">" . $MessageText . "</p>"; // Format $MessageText
|
$MessageText = "<p " . $class . ">" . $MessageText . "</p>"; // Format $MessageText
|
||||||
$format = "<div " . $class . ">\n<table>\n<tr>\n<td>" . $MessageTyp . "</td>\n<td>" . $MessageHeadline . $MessageText . "</td>\n</tr>\n</table>\n</div>\n";
|
$format = "<div " . $class . ">\n<table>\n<tr>\n<td>" . $MessageTyp . "</td>\n<td>" . $MessageHeadline . $MessageText . "</td>\n</tr>\n</table>\n</div>\n";
|
||||||
if (is_array($MessageVariables)) {
|
if (is_array($MessageVariables)) {
|
||||||
array_unshift($MessageVariables, $format);
|
if (sizeof($MessageVariables) > 0) {
|
||||||
call_user_func_array('printf',$MessageVariables);
|
array_unshift($MessageVariables, $format);
|
||||||
|
call_user_func_array('printf',$MessageVariables);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo $format;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
printf($format, $MessageVariables);
|
printf($format, $MessageVariables);
|
||||||
|
|
Loading…
Reference in New Issue