Diff

mod_mam/mod_mam.lua @ 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
parent 2042:752eee154891
child 2270:9c99200afd17
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;