--- cacti-0.8.7g/graph_view.php 2010-07-09 18:33:46.000000000 -0400 +++ cacti-0.8.7g-patched/graph_view.php 2010-07-27 21:30:31.000000000 -0400 @@ -204,7 +204,7 @@ $sql_where = ""; $sql_join = ""; } - /* the user select a bunch of graphs of the 'list' view and wants them dsplayed here */ + /* the user select a bunch of graphs of the 'list' view and wants them displayed here */ if (isset($_REQUEST["style"])) { if (get_request_var_request("style") == "selective") { @@ -296,8 +296,9 @@ $sql_where = get_graph_permissions_sql($current_user["policy_graphs"], $current_user["policy_hosts"], $current_user["policy_graph_templates"]); $hosts = db_fetch_assoc("SELECT DISTINCT host.id, host.description as name - FROM (graph_templates_graph,graph_local) - LEFT JOIN host ON (host.id=graph_local.host_id) + FROM host + LEFT JOIN graph_local ON ( host.id = graph_local.host_id ) + LEFT JOIN graph_templates_graph ON ( graph_templates_graph.local_graph_id = graph_local.id ) LEFT JOIN graph_templates ON (graph_templates.id=graph_local.graph_template_id) LEFT JOIN user_auth_perms ON ((graph_templates_graph.local_graph_id=user_auth_perms.item_id and user_auth_perms.type=1 and user_auth_perms.user_id=" . $_SESSION["sess_user_id"] . ") OR (host.id=user_auth_perms.item_id and user_auth_perms.type=3 and user_auth_perms.user_id=" . $_SESSION["sess_user_id"] . ") OR (graph_templates.id=user_auth_perms.item_id and user_auth_perms.type=4 and user_auth_perms.user_id=" . $_SESSION["sess_user_id"] . ")) WHERE graph_templates_graph.local_graph_id=graph_local.id @@ -327,8 +328,9 @@ "> -
+
@@ -578,8 +580,9 @@ $sql_where = get_graph_permissions_sql($current_user["policy_graphs"], $current_user["policy_hosts"], $current_user["policy_graph_templates"]); $hosts = db_fetch_assoc("SELECT DISTINCT host.id, host.description as name - FROM (graph_templates_graph,graph_local) - LEFT JOIN host ON (host.id=graph_local.host_id) + FROM host + LEFT JOIN graph_local ON ( host.id = graph_local.host_id ) + LEFT JOIN graph_templates_graph ON ( graph_templates_graph.local_graph_id = graph_local.id ) LEFT JOIN graph_templates ON (graph_templates.id=graph_local.graph_template_id) LEFT JOIN user_auth_perms ON ((graph_templates_graph.local_graph_id=user_auth_perms.item_id and user_auth_perms.type=1 and user_auth_perms.user_id=" . $_SESSION["sess_user_id"] . ") OR (host.id=user_auth_perms.item_id and user_auth_perms.type=3 and user_auth_perms.user_id=" . $_SESSION["sess_user_id"] . ") OR (graph_templates.id=user_auth_perms.item_id and user_auth_perms.type=4 and user_auth_perms.user_id=" . $_SESSION["sess_user_id"] . ")) WHERE graph_templates_graph.local_graph_id=graph_local.id @@ -608,8 +611,9 @@ " . htmlspecialchars($graph["title_cache"]) . "", $graph["local_graph_id"]); + form_selectable_cell("" . htmlspecialchars($graph["title_cache"]) . "", $graph["local_graph_id"]); form_selectable_cell($graph["height"] . "x" . $graph["width"], $graph["local_graph_id"]); form_checkbox_cell($graph["title_cache"], $graph["local_graph_id"]); form_end_row(); @@ -795,8 +799,8 @@ strDel = strDel.substring(0,strDel.length - 1); strURL = '&graph_add=' + strAdd + '&graph_remove=' + strDel; return strNavURL + strURL; - alert(strAdd); - alert(strDel); + //alert(strAdd); + //alert(strDel); } function url_go(strURL) { document.location = strURL;