... | ... |
@@ -52,7 +52,7 @@ else { |
52 | 52 |
} |
53 | 53 |
|
54 | 54 |
|
55 |
-$is_autoresponder = is_array($account['autoresponder']) && $account['autoresponder']['valid_from'] != NULL; |
|
55 |
+$is_autoresponder = is_array($account['autoresponder']) && $account['autoresponder']['valid_from'] != NULL && ($account['autoresponder']['valid_until'] > date('Y-m-d') || $account['autoresponder']['valid_until'] == NULL); |
|
56 | 56 |
$is_forward = (count($account['forwards']) > 0); |
57 | 57 |
$is_mailbox = ($account['password'] != NULL || $id == 0); |
58 | 58 |
$numforwards = max(count($account['forwards']), 1); |
... | ... |
@@ -74,7 +74,6 @@ if ($_GET['action'] == 'edit') |
74 | 74 |
} |
75 | 75 |
$account['spamfilter'] = $_POST['spamfilter_action']; |
76 | 76 |
|
77 |
- |
|
78 | 77 |
$ar = empty_autoresponder_config(); |
79 | 78 |
$valid_from_date = time(); |
80 | 79 |
$valid_until_date = NULL; |
... | ... |
@@ -111,10 +110,10 @@ if ($_GET['action'] == 'edit') |
111 | 110 |
} |
112 | 111 |
if (!isset($_POST['autoresponder']) || $_POST['autoresponder'] != 'yes') { |
113 | 112 |
$valid_from_date = NULL; |
114 |
- } |
|
115 |
- if ($valid_until_date && $valid_until_date < time()) { |
|
116 |
- warning('Das Deaktivierungs-Datum liegt in der Vergangenheit, eine automatische Deaktivierung wird nicht stattfinden.'); |
|
117 |
- $valid_until_date = NULL; |
|
113 |
+ } else { |
|
114 |
+ if ($valid_until_date && $valid_until_date < time()) { |
|
115 |
+ warning('Das Deaktivierungs-Datum liegt in der Vergangenheit, der Autoresponder wird sofort deaktiviert!'); |
|
116 |
+ } |
|
118 | 117 |
} |
119 | 118 |
if ($valid_from_date) { |
120 | 119 |
$ar['valid_from'] = date('Y-m-d', $valid_from_date); |