Skip to content

Commit

Permalink
write repository name and path into message
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwechner committed Jan 25, 2012
1 parent e6e69e5 commit 210e966
Showing 1 changed file with 7 additions and 6 deletions.
Expand Up @@ -92,15 +92,16 @@ protected InputStream getContentXML(String viewId) throws Exception {
if(repo != null) {
YarepUtil yu = new YarepUtil();

String path = "/";
if (getEnvironment().getRequest().getParameter("path") != null) {
path = getEnvironment().getRequest().getParameter("path"); // INFO: Allows to re-index sub-tree, for example http://127.0.0.1:8080/yanel/yanel-website/re-index.html?repository=yanel_data&path=/en/documentation
}

try {
String path = "/";
if (getEnvironment().getRequest().getParameter("path") != null) {
path = getEnvironment().getRequest().getParameter("path"); // INFO: Allows to re-index sub-tree, for example http://127.0.0.1:8080/yanel/yanel-website/re-index.html?repository=yanel_data&path=/en/documentation
}
yu.indexRepository(repo, path);
sb.append("<r:message>Re-indexing was successful.</r:message>");
sb.append("<r:message>Re-indexing of repository '" + repo.getName() + "' starting at path '" + path + "' was successful :-)</r:message>");
} catch(Exception e) {
sb.append("<r:exception>Re-indexing failed with exception: ");
sb.append("<r:exception>Re-indexing of repository '" + repo.getName() + "' starting at path '" + path + "' failed with exception: ");
sb.append(e.getMessage());
sb.append("</r:exception>");
}
Expand Down

0 comments on commit 210e966

Please sign in to comment.