]> git.pld-linux.org Git - packages/cacti.git/commitdiff
- match host_name also for action=preview; rel 4 auto/ac/cacti-0_8_7e-4
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 7 Oct 2009 09:44:41 +0000 (09:44 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    cacti.spec -> 1.114
    host_name-url.patch -> 1.2

cacti.spec
host_name-url.patch

index 35d4185760ec7653b0e1552d4a555e429f0bf3d4..716a6c9825cdde6701433398ec0fd2067fa2841e 100644 (file)
@@ -3,7 +3,7 @@ Summary:        Cacti is a PHP frontend for rrdtool
 Summary(pl.UTF-8):     Cacti - frontend w PHP do rrdtoola
 Name:          cacti
 Version:       0.8.7e
-Release:       3
+Release:       4
 License:       GPL
 Group:         Applications/WWW
 Source0:       http://www.cacti.net/downloads/%{name}-%{version}.tar.gz
index 7a613645fb74851137c1dde778d9e3758e003e14..2399d1b071aca40031d30b4426a1392af343a815 100644 (file)
@@ -1,6 +1,24 @@
---- 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 @@
+--- cacti-0.8.7e/graph_view.php        2009-10-02 10:30:43.000000000 +0300
++++ cacti/graph_view.php       2009-10-07 12:42:04.032959475 +0300
+@@ -151,11 +151,17 @@
+       define("ROWS_PER_PAGE", read_graph_config_option("preview_graphs_per_page"));
+       /* ================= 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"));
+       input_validate_input_number(get_request_var_request("page"));
+       /* ==================================================== */
++      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"));
+@@ -550,10 +556,16 @@
        }
  
        /* ================= input validation ================= */
This page took 0.079001 seconds and 4 git commands to generate.