/** * @return struct|boolean - either array of vacation details or boolean false if the user has none. */ public function getDetails() { $vh = new VacationHandler($_SESSION['sessid']['username']); return $vh->get_details(); }
} date_default_timezone_set(@date_default_timezone_get()); # Suppress date.timezone warnings $vh = new VacationHandler($fUsername); $choice_of_reply = Config::read('vacation_choice_of_reply'); foreach (array_keys($choice_of_reply) as $key) { $choice_of_reply[$key] = Config::Lang($choice_of_reply[$key]); } if ($_SERVER['REQUEST_METHOD'] == "GET") { $tSubject = ''; $tBody = ''; $tActiveFrom = ''; $tActiveUntil = ''; $tUseremail = $fUsername; $tInterval_Time = ''; $details = $vh->get_details(); if ($details != false) { $tSubject = $details['subject']; $tBody = $details['body']; $tInterval_Time = $details['interval_time']; $tActiveFrom = $details['activeFrom']; $tActiveUntil = $details['activeUntil']; } if ($vh->check_vacation()) { flash_info(sprintf($PALANG['pUsersVacation_welcome_text'], htmlentities($tUseremail))); } //set a default, reset fields for coming back selection if ($tSubject == '') { $tSubject = html_entity_decode($PALANG['pUsersVacation_subject_text'], ENT_QUOTES, 'UTF-8'); } if ($tBody == '') {