Skip to content

Commit

Permalink
allow -24h style to/from for graphs again (#10294)
Browse files Browse the repository at this point in the history
  • Loading branch information
murrant committed Jun 2, 2019
1 parent 15d72c2 commit 437a577
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/html/graphs/common.inc.php
Expand Up @@ -3,11 +3,11 @@
use LibreNMS\Util\Clean;

if ($_GET['from']) {
$from = (int)$_GET['from'];
$from = preg_match('/(-\d+[hdm]|now)/', $_GET['from']) ? $_GET['from'] : (int)$_GET['from'];
}

if ($_GET['to']) {
$to = (int)$_GET['to'];
$to = preg_match('/(-?\d+[hdm]|now)/', $_GET['to']) ? $_GET['to'] : (int)$_GET['to'];
}

if ($_GET['width']) {
Expand Down

0 comments on commit 437a577

Please sign in to comment.