summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Zorzi <lucazorzi91@gmail.com>2016-04-18 22:53:43 +0200
committerStephen Beaver <sbeaver@netgate.com>2016-04-19 07:56:38 -0400
commit8d967cb29f1039a1d30eedbf0a62745989edbf5c (patch)
treefdbea4230530b3939703d0f4524339bd37d452ee
parent1b0565910835164e20e00928ccafcf70a31b540b (diff)
downloadpfsense-8d967cb29f1039a1d30eedbf0a62745989edbf5c.zip
pfsense-8d967cb29f1039a1d30eedbf0a62745989edbf5c.tar.gz
Added back GET parameters support (as in pre-2.3)
In version 2.3 the Traffic Graph page switched from GET to POST parameters to control the graph. This patch restores the old functionality, which was useful to bookmark a given graph configuration. (cherry picked from commit 709309eb91bab632957829a389721a800f984d64)
-rw-r--r--src/usr/local/www/status_graph.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/usr/local/www/status_graph.php b/src/usr/local/www/status_graph.php
index 0ce5c0c..d83574b 100644
--- a/src/usr/local/www/status_graph.php
+++ b/src/usr/local/www/status_graph.php
@@ -97,6 +97,21 @@ foreach (array('server', 'client') as $mode) {
}
}
+// Compatiblity to restore GET parameters used pre-2.3
+// Useful to save a URL for a given graph configuration
+if (isset($_GET['if']) && !isset($_POST['if'])) {
+ $_POST['if'] = $_GET['if'];
+}
+if (isset($_GET['sort']) && !isset($_POST['sort'])) {
+ $_POST['sort'] = $_GET['sort'];
+}
+if (isset($_GET['filter']) && !isset($_POST['filter'])) {
+ $_POST['filter'] = $_GET['filter'];
+}
+if (isset($_GET['hostipformat']) && !isset($_POST['hostipformat'])) {
+ $_POST['hostipformat'] = $_GET['hostipformat'];
+}
+
if ($_POST['if']) {
$curif = $_POST['if'];
$found = false;
OpenPOWER on IntegriCloud