X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Fweb%2Fquery_age;h=a115bbdd562dd53286be49ff175f5519f366cd28;hb=ac1cf45e4672ac30f232cee92e60eb1a2d17a5c5;hp=efd709692a855426a1ae3f7ca819a2f009ce8b4f;hpb=9f2bf0795621de264cea63060079704dfd9d5a0b;p=ypp-sc-tools.db-live.git diff --git a/yarrg/web/query_age b/yarrg/web/query_age index efd7096..a115bbd 100644 --- a/yarrg/web/query_age +++ b/yarrg/web/query_age @@ -47,7 +47,7 @@ $dbh my $now= time; my $sth= $dbh->prepare("SELECT archipelago, islandid, islandname, timestamp - FROM uploads NATURAL JOIN islands + FROM uploads JOIN islands USING (islandid) ORDER BY archipelago, islandname"); $sth->execute(); @@ -123,6 +123,7 @@ Time since this page loaded: var now= Date.now(); debug('updating now='+now); for (var ageid in <% $jsprefix %>ages) { + if (!<% $jsprefix %>ages.hasOwnProperty(ageid)) continue; var oldage= <% $jsprefix %>ages[ageid]; var el= document.getElementById(<% $elemidprefix %>ageid); var age= oldage + (now - da_pageload) / 1000;