aboutsummaryrefslogtreecommitdiffstats
path: root/config/mailreport/status_mail_report_add_graph.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-07-27 14:55:38 -0400
committerjim-p <jimp@pfsense.org>2011-07-27 14:55:38 -0400
commitf4a2b3e843a72e4b62c54bc5da4ef4f3c568bd89 (patch)
tree202f141eb0bf19fec02fe0f5728a251aa09c00d0 /config/mailreport/status_mail_report_add_graph.php
parent060d043124f5cf83875e2cece7be9d76294e7cab (diff)
downloadpfsense-packages-f4a2b3e843a72e4b62c54bc5da4ef4f3c568bd89.tar.gz
pfsense-packages-f4a2b3e843a72e4b62c54bc5da4ef4f3c568bd89.tar.bz2
pfsense-packages-f4a2b3e843a72e4b62c54bc5da4ef4f3c568bd89.zip
Respect the user-defined interface names in e-mailed RRD graphs, and in drop-downs for building reports.
Diffstat (limited to 'config/mailreport/status_mail_report_add_graph.php')
-rw-r--r--config/mailreport/status_mail_report_add_graph.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/config/mailreport/status_mail_report_add_graph.php b/config/mailreport/status_mail_report_add_graph.php
index 17d7731c..c0287367 100644
--- a/config/mailreport/status_mail_report_add_graph.php
+++ b/config/mailreport/status_mail_report_add_graph.php
@@ -183,12 +183,15 @@ include("head.inc");
<select name="graph" class="formselect" style="z-index: -10;">
<?php
foreach ($custom_databases as $db => $database) {
- $optionc = split("-", $database);
- $search = array("-", ".rrd", $optionc);
- $replace = array(" :: ", "", $friendly);
+ $optionc = explode("-", $database);
+ $optionc[1] = str_replace(".rrd", "", $optionc[1]);
+ $friendly = convert_friendly_interface_to_friendly_descr(strtolower($optionc[0]));
+ if(!empty($friendly)) {
+ $optionc[0] = $friendly;
+ }
+ $prettyprint = ucwords(implode(" :: ", $optionc));
echo "<option value=\"{$database}\"";
- $prettyprint = ucwords(str_replace($search, $replace, $database));
- if($pconfig['graph'] == $database) {
+ if ($pconfig['graph'] == $database) {
echo " selected";
}
echo ">" . htmlspecialchars($prettyprint) . "</option>\n";