mod_mam: Include 'w' (week) in pattern for "archive_expires_after" option (fixes #627)
authorKim Alvefur <zash@zash.se>
Mon, 15 Feb 2016 23:56:12 +0100
changeset 2053 50c188cf0ae3
parent 2052 2c6bc38f19a6
child 2054 49cc6a555dc7
mod_mam: Include 'w' (week) in pattern for "archive_expires_after" option (fixes #627)
mod_mam/mod_mam.lua
--- a/mod_mam/mod_mam.lua	Sat Feb 13 15:16:43 2016 +0100
+++ b/mod_mam/mod_mam.lua	Mon Feb 15 23:56:12 2016 +0100
@@ -276,7 +276,7 @@
 if cleanup_after ~= "never" then
 	local day = 86400;
 	local multipliers = { d = day, w = day * 7, m = 31 * day, y = 365.2425 * day };
-	local n, m = cleanup_after:lower():match("(%d+)%s*([dmy]?)");
+	local n, m = cleanup_after:lower():match("(%d+)%s*([dwmy]?)");
 	if not n then
 		module:log("error", "Could not parse archive_expires_after string %q", cleanup_after);
 		return false;