From de065e594fbe6ee93d968f2f87aa51992110c981 Mon Sep 17 00:00:00 2001 From: low012 Date: Thu, 17 Feb 2011 20:40:34 +0000 Subject: [PATCH] *) make sure that only positive values are accepted as refresh interval on Crawler Monitor page git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7489 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/js/Crawler.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htroot/js/Crawler.js b/htroot/js/Crawler.js index 5f53a8cc0..626dded84 100644 --- a/htroot/js/Crawler.js +++ b/htroot/js/Crawler.js @@ -29,7 +29,11 @@ function changeInterval(){ } } function newInterval(){ - refreshInterval=document.getElementById("nextUpdate").value; + var newInterval=document.getElementById("nextUpdate").value; + // make sure that only positive intervals can be set + if(newInterval>0){ + refreshInterval=newInterval; + } refresh(); countInterval=window.setInterval("countdown()", 1000); changing=false; @@ -37,7 +41,7 @@ function newInterval(){ function countdown(){ if(statusLoaded && queueLoaded){ document.getElementById("nextUpdate").value=wait; - wait--; + wait--; if(wait==0){ refresh(); }