Removed explicit “graceline” calculation since it’s done directly in grace.php; added a “todo” comment
This commit is contained in:
parent
efc6f2f79f
commit
5ef21502c3
1 changed files with 2 additions and 6 deletions
|
@ -11,7 +11,7 @@ $btu=time();
|
|||
$dlanguc=strtoupper($dlang);
|
||||
|
||||
require '../lib/n2es.php';
|
||||
require '../lib/gracetime.php';
|
||||
require '../lib/grace.php';
|
||||
require '../lib/fnum.php';
|
||||
require '../lib/realfloat.php';// had to resort to this because php 7.3 has a bug: when echoing a float, it uses the decimal separator of the locale that was set with setlocale, making a mess when the separator is different than "." with stuff expecting it to be "."
|
||||
|
||||
|
@ -30,11 +30,7 @@ debug('$_GET: '.print_r($_GET,true),$debug);
|
|||
debug('LOCALE: '.setlocale(LC_ALL,0).N,$debug);
|
||||
|
||||
// an instance is displayed as "New" if its age, relative to the InsertTS field, is less or equal than this (currently 30 days)
|
||||
$oldline=30*24*60*60;
|
||||
|
||||
// an instance is considered dead if the last time it responded is before the graceline (see code below); we fix it at start of today - $gracetime
|
||||
// $gracetime is defined in mustard/include/gracetime.php
|
||||
$graceline=gmmktime(0,0,0,gmdate('n',$btu),gmdate('j',$btu),gmdate('Y',$btu))-$gracetime;
|
||||
$oldline=30*24*60*60;// todo: do it relative to firstseen?
|
||||
|
||||
if (array_key_exists('id',$_GET) && preg_match('/^\d+$/',$_GET['id'])===1) {
|
||||
$_GET['id']+=0;
|
||||
|
|
Loading…
Reference in a new issue