@@ -341,47 +341,50 @@ if ($vacation_setup || $vacation_setup_r
if (!$is_admin && !empty($vacation_forward_to) && !in_array($vacation_forward_to, $user_names)) {
error_msg(sprintf('%s (%s)!', get_text('error_unknown_forward'), $vacation_forward_to));
break;
}
// Actually set it
if (!$FOOTER || $vacation_setup_raw || $x_wsv_raw) {
$vacation_body_full = $vacation_body;
} else {
$vacation_body_full = str_replace("\n", "\r\n", str_replace("\r", "", rtrim(rtrim($vacation_body)."\n\n".$FOOTER)));
// Prepare vacation(1) message
if (!empty($vacation_forward_to)) {
header_set($vacation_headers, sprintf('X-WSV-Forward-To: %s', $vacation_forward_to));
if ( $vacation_setup_raw ) {
$vacation_msg = message_join($vacation_headers, $vacation_body);
$vacation_msg_in = message_join($vacation_headers, $vacation_body);
$vacation_msg = message_join($vacation_headers, $vacation_body_full);
// echo "<pre>"; // |:debug:|
// var_dump($vacation_headers);
// var_dump($vacation_body);
// echo $vacation_msg;
// echo "</pre>";
$vacation_msg = vacation_join($vacation_subject, $vacation_body, $vacation_headers);
$vacation_msg_in = vacation_join($vacation_subject, $vacation_body, $vacation_headers);
$vacation_msg = vacation_join($vacation_subject, $vacation_body_full, $vacation_headers);
$pipe_cmd = sprintf(
'%s -u %s %s %s %s',
$SUDO_CMD, $user, $SUDO_OPT_H, $WRITE_TO_CMD, $vacation_msg_in_file);
// fprintf($stderr, "\$pipe_cmd: %s<br>\n", $pipe_cmd);
$vacation_msg_pipe = popen($pipe_cmd, 'w');
fwrite($vacation_msg_pipe, $vacation_msg);
fwrite($vacation_msg_pipe, $vacation_msg_in);
pclose($vacation_msg_pipe);
$SUDO_CMD, $user, $SUDO_OPT_H, $WRITE_TO_CMD, $vacation_msg_file);
$full_msg = $vacation_msg;
$full_msg = rtrim(rtrim($vacation_msg)."\n".$FOOTER)."\n";
fwrite($vacation_msg_pipe, $full_msg);
// Initialize vacation(1) if necessary.
if (!test_readable($vacation_db_file, $user)) {
$cmd = sprintf(
@@ -582,13 +585,13 @@ if ($x_wsv_raw || $EXPERT_ENABLED)
# $form[] = sshl('<a href="#">'.get_text('expert_mode').'</a>', 'expert-mode-head');
$form[] = '<div>';
// raw message
$form[] = sprintf('<span class="label">%s<sup>*</sup>:</span>', get_text('message'));
$form[] = (
'<textarea name="message" cols="56" rows="'.$text_rows.'"'
.' style="vertical-align: top; width: 440px;">' . htmlspecialchars($vacation_msg, ENT_NOQUOTES, "UTF-8") . '</textarea><br />');
.' style="vertical-align: top; width: 440px;">' . htmlspecialchars($vacation_msg_in, ENT_NOQUOTES, "UTF-8") . '</textarea><br />');
$form[] = '<span class="label"> </span>';
'<span style="display: inline-block; width: 440px; margin-top: 5px; font-size: 8pt;">'
. get_text('explain_expert')
.'</span><br />');
Status change: