aboutsummaryrefslogtreecommitdiffstats
path: root/config/mailreport/status_mail_report_add_graph.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2014-09-16 15:31:47 -0400
committerjim-p <jimp@pfsense.org>2014-09-16 15:35:21 -0400
commit6fc32123543416dff79f9b095357c5de6805cfd4 (patch)
tree12cf7f22048cf35ad889e2993da70d0882d26b97 /config/mailreport/status_mail_report_add_graph.php
parentc77104440623b60b8fb2a1d2f09c8c554e3cba68 (diff)
downloadpfsense-packages-6fc32123543416dff79f9b095357c5de6805cfd4.tar.gz
pfsense-packages-6fc32123543416dff79f9b095357c5de6805cfd4.tar.bz2
pfsense-packages-6fc32123543416dff79f9b095357c5de6805cfd4.zip
Follow 2.2 and change 8hour->eighthour and 4year->fouryear to avoid having a numeral start an ID. Add some code so it will fix up existing values as they are changed.
Diffstat (limited to 'config/mailreport/status_mail_report_add_graph.php')
-rw-r--r--config/mailreport/status_mail_report_add_graph.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/config/mailreport/status_mail_report_add_graph.php b/config/mailreport/status_mail_report_add_graph.php
index 3f629d56..d6f0d362 100644
--- a/config/mailreport/status_mail_report_add_graph.php
+++ b/config/mailreport/status_mail_report_add_graph.php
@@ -130,16 +130,16 @@ $custom_databases = array_merge($dbheader_custom, $databases);
$styles = array('inverse' => gettext('Inverse'),
'absolute' => gettext('Absolute'));
-$graphs = array("8hour", "day", "week", "month", "quarter", "year", "4year");
+$graphs = array("eighthour", "day", "week", "month", "quarter", "year", "fouryear");
$periods = array("absolute" => gettext("Absolute Timespans"), "current" => gettext("Current Period"), "previous" => gettext("Previous Period"));
$graph_length = array(
- "8hour" => 28800,
+ "eighthour" => 28800,
"day" => 86400,
"week" => 604800,
"month" => 2764800,
"quarter" => 8035200,
"year" => 31622400,
- "4year" => 126489600);
+ "fouryear" => 126489600);
if ($_POST) {
unset($_POST['__csrf_magic']);
@@ -219,6 +219,7 @@ include("head.inc");
<select name="timespan" class="formselect" style="z-index: -10;">
<?php
foreach (array_keys($graph_length) as $timespan) {
+ $pconfig['timespan'] = fixup_graph_timespan($pconfig['timespan']);
echo "<option value=\"$timespan\"";
if ($timespan == $pconfig['timespan']) echo " selected";
echo ">" . htmlspecialchars(ucwords($timespan)) . "</option>\n";