Commit a8bcbc0d authored by Dave Cridland's avatar Dave Cridland Committed by daryl herzmann

OF-1031 Ensure manual index rebuilds work (#718)

parent 5f3fab0f
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
else { else {
var rebuildProgress = document.getElementById('rebuildProgress'); var rebuildProgress = document.getElementById('rebuildProgress');
rebuildProgress.innerHTML = "100"; rebuildProgress.innerHTML = "100";
Effect.Fade('rebuildElement'); // Effect.Fade('rebuildElement');
} }
} }
</script> </script>
...@@ -174,9 +174,14 @@ ...@@ -174,9 +174,14 @@
Cookie csrfCookie = CookieUtils.getCookie(request, "csrf"); Cookie csrfCookie = CookieUtils.getCookie(request, "csrf");
String csrfParam = ParamUtils.getParameter(request, "csrf"); String csrfParam = ParamUtils.getParameter(request, "csrf");
Map errors = new HashMap();
String errorMessage = "";
if (csrfCookie == null || csrfParam == null || !csrfCookie.getValue().equals(csrfParam)) { if (csrfCookie == null || csrfParam == null || !csrfCookie.getValue().equals(csrfParam)) {
rebuildIndex = false; rebuildIndex = false;
update = false; update = false;
errors.put("csrf", "");
errorMessage = "Archive Index rebuild failed.";
} }
csrfParam = StringUtils.randomString(16); csrfParam = StringUtils.randomString(16);
CookieUtils.setCookie(request, response, "csrf", csrfParam, -1); CookieUtils.setCookie(request, response, "csrf", csrfParam, -1);
...@@ -188,12 +193,13 @@ ...@@ -188,12 +193,13 @@
} }
if (rebuildIndex) { if (rebuildIndex) {
archiveIndexer.rebuildIndex(); if (archiveIndexer.rebuildIndex() == null) {
errors.put("rebuildIndex", "");
errorMessage = "Archive Index rebuild failed.";
}
} }
// Update the session kick policy if requested // Update the session kick policy if requested
Map errors = new HashMap();
String errorMessage = "";
if (update) { if (update) {
// New settings for message archiving. // New settings for message archiving.
boolean metadataArchiving = request.getParameter("metadataArchiving") != null; boolean metadataArchiving = request.getParameter("metadataArchiving") != null;
......
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