diff --git a/html/pages/graphs.inc.php b/html/pages/graphs.inc.php index c7a0bc0076..aa7d1cc750 100644 --- a/html/pages/graphs.inc.php +++ b/html/pages/graphs.inc.php @@ -13,8 +13,8 @@ if($_SESSION['widescreen']) $thumb_width=113; } -if (is_numeric($vars['from'])) { $from = $vars['from']; } else { $from = $config['time']['day']; } -if (is_numeric($vars['to'])) { $to = $vars['to']; } else { $to = $config['time']['now']; } +if (!is_numeric($vars['from'])) { $vars['from'] = $config['time']['day']; } +if (!is_numeric($vars['to'])) { $vars['to'] = $config['time']['now']; } preg_match('/^(?P[A-Za-z0-9]+)_(?P.+)/', mres($vars['type']), $graphtype); @@ -52,13 +52,12 @@ if (!$auth) echo("
"); - $thumb_array = array('sixhour' => '6 Hours', 'day' => '25 Hours', 'twoday' => '48 Hours', 'week' => 'One Week', 'twoweek' => 'Two Weeks', + $thumb_array = array('sixhour' => '6 Hours', 'day' => '24 Hours', 'twoday' => '48 Hours', 'week' => 'One Week', 'twoweek' => 'Two Weeks', 'month' => 'One Month', 'twomonth' => 'Two Months','year' => 'One Year', 'twoyear' => 'Two Years'); foreach ($thumb_array as $period => $text) { - $graph_array['from'] = $config['time'][$period]; $link_array = $vars; @@ -80,7 +79,7 @@ if (!$auth) $graph_array['height'] = "300"; $graph_array['width'] = $graph_width; - + echo generate_graph_js_state($graph_array); echo("
");