VacationHandler:

- check_vacation() used outdated syntax $ah->get() which nowadays only
  returns true/false. Fixed to fetch $ah->result() and added at least
  basic error handling.
Indirectly ;-) reported by supa_user on IRC


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1075 a1433add-5e2c-0410-b055-b7f2511e0802
pull/2/head
Christian Boltz 15 years ago
parent 8044cb9dc1
commit 931a375255

@ -54,7 +54,11 @@ class VacationHandler {
*/
function check_vacation() {
$ah = new AliasHandler($this->username);
$aliases = $ah->get(true); // fetch all.
$success = $ah->get(true); # fetch all.
if (!$success) {
return false; # TODO: error handling?
}
$aliases = $ah->result();
foreach($aliases as $alias) {
if($ah->is_vacation_address($alias)) {
return true;

Loading…
Cancel
Save