Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
960045a3
Commit
960045a3
authored
May 16, 2014
by
Tom Evans
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OF-764: Restore default of two days for MUC history reload
parent
8667c641
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
MUCPersistenceManager.java
.../jivesoftware/openfire/muc/spi/MUCPersistenceManager.java
+4
-9
No files found.
src/java/org/jivesoftware/openfire/muc/spi/MUCPersistenceManager.java
View file @
960045a3
...
@@ -227,15 +227,10 @@ public class MUCPersistenceManager {
...
@@ -227,15 +227,10 @@ public class MUCPersistenceManager {
// enabled
// enabled
if
(
room
.
isLogEnabled
())
{
if
(
room
.
isLogEnabled
())
{
pstmt
=
con
.
prepareStatement
(
LOAD_HISTORY
);
pstmt
=
con
.
prepareStatement
(
LOAD_HISTORY
);
// Reload the history, using "muc.history.reload.limit" (days) if present
// Reload the history, using "muc.history.reload.limit" (days); defaults to 2
long
from
=
0
;
int
reloadLimitDays
=
JiveGlobals
.
getIntProperty
(
MUC_HISTORY_RELOAD_LIMIT
,
2
);
String
reloadLimit
=
JiveGlobals
.
getProperty
(
MUC_HISTORY_RELOAD_LIMIT
);
Log
.
warn
(
"MUC history reload limit set to "
+
reloadLimitDays
+
" days"
);
if
(
reloadLimit
!=
null
)
{
long
from
=
System
.
currentTimeMillis
()
-
(
86400000
*
reloadLimitDays
);
// 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
);
}
pstmt
.
setString
(
1
,
StringUtils
.
dateToMillis
(
new
Date
(
from
)));
pstmt
.
setString
(
1
,
StringUtils
.
dateToMillis
(
new
Date
(
from
)));
pstmt
.
setLong
(
2
,
room
.
getID
());
pstmt
.
setLong
(
2
,
room
.
getID
());
rs
=
pstmt
.
executeQuery
();
rs
=
pstmt
.
executeQuery
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment