Console: Don't disable updates when restarting from /configupdate

Recognize router.newsRefreshFrequency=0 as "never"
This commit is contained in:
zzz
2014-11-06 16:41:29 +00:00
parent 76e4b49d9d
commit 7deb8c1bcb
2 changed files with 5 additions and 0 deletions

View File

@ -170,6 +170,9 @@ public class ConfigUpdateHandler extends FormHandler {
return;
}
if (!_action.equals(_("Save")))
return;
Map<String, String> changes = new HashMap<String, String>();
if ( (_newsURL != null) && (_newsURL.length() > 0) ) {

View File

@ -106,6 +106,8 @@ public class ConfigUpdateHelper extends HelperBase {
long ms = ConfigUpdateHandler.DEFAULT_REFRESH_FREQ;
try {
ms = Long.parseLong(freq);
if (ms <= 0)
ms = -1;
} catch (NumberFormatException nfe) {}
StringBuilder buf = new StringBuilder(256);