Commit 960045a3 authored by Tom Evans's avatar Tom Evans

OF-764: Restore default of two days for MUC history reload

parent 8667c641
......@@ -227,15 +227,10 @@ public class MUCPersistenceManager {
// enabled
if (room.isLogEnabled()) {
pstmt = con.prepareStatement(LOAD_HISTORY);
// Reload the history, using "muc.history.reload.limit" (days) if present
long from = 0;
String reloadLimit = JiveGlobals.getProperty(MUC_HISTORY_RELOAD_LIMIT);
if (reloadLimit != null) {
// if the property is defined, but not numeric, default to 2 (days)
int reloadLimitDays = JiveGlobals.getIntProperty(MUC_HISTORY_RELOAD_LIMIT, 2);
Log.warn("MUC history reload limit set to " + reloadLimitDays + " days");
from = System.currentTimeMillis() - (86400000 * reloadLimitDays);
}
// Reload the history, using "muc.history.reload.limit" (days); defaults to 2
int reloadLimitDays = JiveGlobals.getIntProperty(MUC_HISTORY_RELOAD_LIMIT, 2);
Log.warn("MUC history reload limit set to " + reloadLimitDays + " days");
long from = System.currentTimeMillis() - (86400000 * reloadLimitDays);
pstmt.setString(1, StringUtils.dateToMillis(new Date(from)));
pstmt.setLong(2, room.getID());
rs = pstmt.executeQuery();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment