]> git.pld-linux.org Git - packages/cacti.git/commitdiff
- understand $host_name in graph_view (map to $host_id) auto/ac/cacti-0_8_7e-3
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 2 Oct 2009 07:32:51 +0000 (07:32 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    host_name-url.patch -> 1.1

host_name-url.patch [new file with mode: 0644]

diff --git a/host_name-url.patch b/host_name-url.patch
new file mode 100644 (file)
index 0000000..7a61364
--- /dev/null
@@ -0,0 +1,19 @@
+--- cacti-0.8.7e/graph_view.php~       2009-06-28 19:07:11.000000000 +0300
++++ cacti-0.8.7e/graph_view.php        2009-10-02 10:30:43.000000000 +0300
+@@ -550,10 +550,16 @@
+       }
+       /* ================= input validation ================= */
++      input_validate_input_regex(get_request_var_request("host_name"), "^([a-zA-Z0-9_.-]+)$");
+       input_validate_input_number(get_request_var_request("host_id"));
+       input_validate_input_number(get_request_var_request("graph_template_id"));
+       /* ==================================================== */
++      if (empty($_REQUEST['host_id']) && !empty($_REQUEST['host_name'])) {
++              // fill $host_id from $host_name. empty result is ok too, we'll list previous view then
++              $_REQUEST['host_id'] = db_fetch_cell("select id from host where description='{$_REQUEST['host_name']}'");
++      }
++
+       /* clean up search string */
+       if (isset($_REQUEST["filter"])) {
+               $_REQUEST["filter"] = sanitize_search_string(get_request_var_request("filter"));
This page took 0.046216 seconds and 4 git commands to generate.