mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-10-23 01:33:29 +00:00
[Web] Set new expire date for time limited aliases via actions button, fixes #1903
This commit is contained in:
1 parent
d99b8aaf69
commit
788e32b328
4 files changed
+19
-10
No files matched your search
@@ -1213,12 +1213,15 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
||||
);
|
||||
continue;
|
||||
}
|
||||
$stmt = $pdo->prepare("UPDATE `spamalias` SET `validity` = (`validity` + 3600) WHERE
|
||||
`address` = :address AND
|
||||
`validity` >= :validity");
|
||||
if (empty($_data['validity'])) {
|
||||
continue;
|
||||
}
|
||||
$validity = round((int)time() + ($_data['validity'] * 3600));
|
||||
$stmt = $pdo->prepare("UPDATE `spamalias` SET `validity` = :validity WHERE
|
||||
`address` = :address");
|
||||
$stmt->execute(array(
|
||||
':address' => $address,
|
||||
':validity' => time()
|
||||
':validity' => $validity
|
||||
));
|
||||
$_SESSION['return'][] = array(
|
||||
'type' => 'success',
|
||||
|
||||
Reference in new issue
Block a user