Changeset

2049:50c188cf0ae3

mod_mam: Include 'w' (week) in pattern for "archive_expires_after" option (fixes #627)
author Kim Alvefur <zash@zash.se>
date Mon, 15 Feb 2016 23:56:12 +0100
parents 2048:2c6bc38f19a6
children 2050:49cc6a555dc7
files mod_mam/mod_mam.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;