* Enforce delay >= 1 in BlogManager.getUpdateDelay()
This commit is contained in:
@ -340,9 +340,13 @@ public class BlogManager {
|
||||
|
||||
public String getDefaultProxyHost() { return _context.getProperty("syndie.defaultProxyHost", ""); }
|
||||
public String getDefaultProxyPort() { return _context.getProperty("syndie.defaultProxyPort", ""); }
|
||||
public int getUpdateDelay() { return Integer.parseInt(_context.getProperty("syndie.updateDelay", "12")); }
|
||||
public String[] getUpdateArchives() { return _context.getProperty("syndie.updateArchives", "").split(","); }
|
||||
public boolean getImportAddresses() { return _context.getProperty("syndie.importAddresses", "false").equals("true"); }
|
||||
public int getUpdateDelay() {
|
||||
int delay = Integer.parseInt(_context.getProperty("syndie.updateDelay", "12"));
|
||||
if (delay < 1) delay = 1;
|
||||
return delay;
|
||||
}
|
||||
|
||||
public boolean authorizeAdmin(String pass) {
|
||||
if (isSingleUser()) return true;
|
||||
|
@ -19,7 +19,6 @@ public class Updater {
|
||||
}
|
||||
_lastUpdate = System.currentTimeMillis();
|
||||
_log.debug("Update started.");
|
||||
User user = new User();
|
||||
String[] archives = bm.getUpdateArchives();
|
||||
for (int i = 0; i < archives.length; i++) {
|
||||
fetchArchive(archives[i]);
|
||||
@ -53,7 +52,6 @@ public class Updater {
|
||||
|
||||
while (true) {
|
||||
int delay = BlogManager.instance().getUpdateDelay();
|
||||
if (delay < 1) delay = 1;
|
||||
update();
|
||||
try {
|
||||
synchronized (this) {
|
||||
|
Reference in New Issue
Block a user