fix #2376 replace with _
This commit is contained in:
parent
59cc8f663a
commit
c29d112b76
2 changed files with 7 additions and 4 deletions
|
@ -140,14 +140,15 @@ public class AdminSchedulerAction extends FessAdminAction {
|
|||
final String decodedName = new String(Base64.getUrlDecoder().decode(name), Constants.CHARSET_UTF_8);
|
||||
scheduledJobForm.name = MessageFormat.format(fessConfig.getJobTemplateTitle(type), decodedName);
|
||||
final String[] ids = new String[] { "", "", "" };
|
||||
final String configId = id.replace('-', '_');
|
||||
if (Constants.WEB_CRAWLER_TYPE.equals(type)) {
|
||||
ids[0] = "\"" + id + "\"";
|
||||
ids[0] = "\"" + configId + "\"";
|
||||
} else if (Constants.FILE_CRAWLER_TYPE.equals(type)) {
|
||||
ids[1] = "\"" + id + "\"";
|
||||
ids[1] = "\"" + configId + "\"";
|
||||
} else if (Constants.DATA_CRAWLER_TYPE.equals(type)) {
|
||||
ids[2] = "\"" + id + "\"";
|
||||
ids[2] = "\"" + configId + "\"";
|
||||
}
|
||||
scheduledJobForm.scriptData = MessageFormat.format(fessConfig.getJobTemplateScript(), ids[0], ids[1], ids[2], id);
|
||||
scheduledJobForm.scriptData = MessageFormat.format(fessConfig.getJobTemplateScript(), ids[0], ids[1], ids[2], configId);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -307,6 +307,8 @@ public class Crawler {
|
|||
// use a default session id
|
||||
final SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
options.sessionId = sdf.format(new Date());
|
||||
} else {
|
||||
options.sessionId = options.sessionId.replace('-', '_');
|
||||
}
|
||||
|
||||
final CrawlingInfoHelper crawlingInfoHelper = ComponentUtil.getCrawlingInfoHelper();
|
||||
|
|
Loading…
Add table
Reference in a new issue