From 497872080b4deaffc67fd92cdc9e6a385e636805 Mon Sep 17 00:00:00 2001 From: FreddleSpl0it <75116288+FreddleSpl0it@users.noreply.github.com> Date: Mon, 9 Nov 2026 22:46:15 +0100 Subject: [PATCH] [Web] Update "Last modified" when tags of a domain or mailbox change --- data/web/inc/functions.mailbox.inc.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/data/web/inc/functions.mailbox.inc.php b/data/web/inc/functions.mailbox.inc.php index 121d43a0c..33fc40369 100644 --- a/data/web/inc/functions.mailbox.inc.php +++ b/data/web/inc/functions.mailbox.inc.php @@ -2524,6 +2524,10 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) { ':domain' => $domain, ':tag_name' => $tag, )); + $stmt = $pdo->prepare("UPDATE `domain` SET `modified` = NOW() WHERE `domain` = :domain"); + $stmt->execute(array( + ':domain' => $domain, + )); } $_SESSION['return'][] = array( @@ -2692,6 +2696,10 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) { ':domain' => $domain, ':tag_name' => $tag, )); + $stmt = $pdo->prepare("UPDATE `domain` SET `modified` = NOW() WHERE `domain` = :domain"); + $stmt->execute(array( + ':domain' => $domain, + )); } $_SESSION['return'][] = array( @@ -3170,6 +3178,10 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) { ':username' => $username, ':tag_name' => $tag, )); + $stmt = $pdo->prepare("UPDATE `mailbox` SET `modified` = NOW() WHERE `username` = :username"); + $stmt->execute(array( + ':username' => $username, + )); } catch (Exception $e) { } } @@ -5916,6 +5928,12 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) { ':domain' => $domain, ':tag_name' => $tag, )); + if ($stmt->rowCount() > 0) { + $stmt = $pdo->prepare("UPDATE `domain` SET `modified` = NOW() WHERE `domain` = :domain"); + $stmt->execute(array( + ':domain' => $domain, + )); + } } } @@ -5968,6 +5986,12 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) { ':username' => $username, ':tag_name' => $tag, )); + if ($stmt->rowCount() > 0) { + $stmt = $pdo->prepare("UPDATE `mailbox` SET `modified` = NOW() WHERE `username` = :username"); + $stmt->execute(array( + ':username' => $username, + )); + } } }