/** * @param string $subject * @param string $body * @param string $interval_time * @param string $activeFrom * @param string $activeUntil * @return boolean true on success. * Whatiis @replyType?? for */ public function setAway($subject, $body, $interval_time = 0, $activeFrom = '2000-01-01', $activeUntil = '2099-12-31') { $vh = new VacationHandler($_SESSION['sessid']['username']); return $vh->set_away($subject, $body, $interval_time, $activeFrom, $activeUntil); }
$tBody = html_entity_decode($PALANG['pUsersVacation_body_text'], ENT_QUOTES, 'UTF-8'); } if (isset($choice_of_reply[$tInterval_Time])) { $fInterval_Time = $tInterval_Time; } else { $fInterval_Time = 0; } // if they've set themselves change OR back, delete any record of vacation emails. // the user is going away - set the goto alias and vacation table as necessary. //Set the vacation data for $fUsername if (!empty($fChange)) { ## check if ActiveUnitl is not back in time, ## because vacation.pl will report SMTP recipient $smtp_recipient which resolves to $email does not have an active vacation (rv: $rv, email: $email)" ## and will not send message if ($tActiveUntil >= date("Y-m-d") and $tActiveUntil >= $tActiveFrom) { if (!$vh->set_away($fSubject, $fBody, $fInterval_Time, $tActiveFrom, $tActiveUntil)) { $error = 1; } } else { if ($tActiveUntil < date("Y-m-d")) { flash_error($PALANG['pVacation_until_before_today']); } else { flash_error($PALANG['pVacation_until_before_from']); } $error = 1; } } //if change, remove old one, then perhaps set new one if (!empty($fBack)) { if (!$vh->remove()) { $error = 1;