Code: Select all
diff -ru cacti-0.8.3a/docs/CHANGELOG cacti-0.8.3/docs/CHANGELOG
--- cacti-0.8.3a/docs/CHANGELOG 2003-08-30 01:13:51.000000000 -0400
+++ cacti-0.8.3/docs/CHANGELOG 2003-08-29 00:45:36.000000000 -0400
@@ -1,10 +1,5 @@
raXnet - cacti
-0.8.3a
--bug#81: Partial/complete poller cache rebuild failure after an upgrade.
--bug#82: Undefined variable error messages under win32/IIS.
--bug: Problems with overlapping graph permissions with multiple users.
-
0.8.3
-bug#50: When viewing a graph, only display it for the RRAs used on the graph.
-bug#66: Users can see a list of all hosts in graph preview mode.
diff -ru cacti-0.8.3a/graph_view.php cacti-0.8.3/graph_view.php
--- cacti-0.8.3a/graph_view.php 2003-08-30 01:13:52.000000000 -0400
+++ cacti-0.8.3/graph_view.php 2003-08-29 00:45:37.000000000 -0400
@@ -38,8 +38,8 @@
}
}
-if (ereg("action=(tree|preview|list)", get_browser_query_string())) {
- $_SESSION["sess_graph_view_url_cache"] = get_browser_query_string();
+if (ereg("action=(tree|preview|list)", $_SERVER["REQUEST_URI"])) {
+ $_SESSION["sess_graph_view_url_cache"] = $_SERVER["REQUEST_URI"];
}
/* set default action */
@@ -137,7 +137,7 @@
$sql_join = "left join host on host.id=graph_local.host_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"] . "))";
+ left join user_auth_perms on ((graph_templates_graph.local_graph_id=user_auth_perms.item_id and user_auth_perms.type=1) OR (host.id=user_auth_perms.item_id and user_auth_perms.type=3) 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"] . ")";
}
/* the user select a bunch of graphs of the 'list' view and wants them dsplayed here */
@@ -297,7 +297,7 @@
from graph_templates_graph,graph_local
left join host on host.id=graph_local.host_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"] . "))
+ left join user_auth_perms on ((graph_templates_graph.local_graph_id=user_auth_perms.item_id and user_auth_perms.type=1) OR (host.id=user_auth_perms.item_id and user_auth_perms.type=3) 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
and graph_templates_graph.local_graph_id>0
" . (empty($sql_where) ? "" : "and $sql_where") . "
diff -ru cacti-0.8.3a/include/config.php cacti-0.8.3/include/config.php
--- cacti-0.8.3a/include/config.php 2003-08-30 01:13:52.000000000 -0400
+++ cacti-0.8.3/include/config.php 2003-08-29 00:45:38.000000000 -0400
@@ -67,6 +67,6 @@
include_once($config["include_path"] . "/database.php");
/* current cacti version */
-$config["cacti_version"] = "0.8.3a";
+$config["cacti_version"] = "0.8.3";
?>
diff -ru cacti-0.8.3a/include/functions.php cacti-0.8.3/include/functions.php
--- cacti-0.8.3a/include/functions.php 2003-08-30 01:13:52.000000000 -0400
+++ cacti-0.8.3/include/functions.php 2003-08-29 00:45:37.000000000 -0400
@@ -1029,7 +1029,7 @@
from graph_templates_graph,graph_local
left join host on host.id=graph_local.host_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"] . "))
+ left join user_auth_perms on ((graph_templates_graph.local_graph_id=user_auth_perms.item_id and user_auth_perms.type=1) OR (host.id=user_auth_perms.item_id and user_auth_perms.type=3) 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
" . (empty($sql_where) ? "" : "and $sql_where") . "
and graph_templates_graph.local_graph_id=$local_graph_id
@@ -1250,7 +1250,7 @@
}
/* keep a cache for each level we encounter */
- $nav_level_cache{$current_array["level"]} = array("id" => $current_page . ":" . $current_action, "url" => get_browser_query_string());
+ $nav_level_cache{$current_array["level"]} = array("id" => $current_page . ":" . $current_action, "url" => $_SERVER["REQUEST_URI"]);
$_SESSION["sess_nav_level_cache"] = $nav_level_cache;
print $current_nav;
@@ -1287,14 +1287,4 @@
order by rra.timespan");
}
-/* get_browser_query_string - returns the full url, including args requested by the browser
- @returns - the url requested by the browser */
-function get_browser_query_string() {
- if (isset($_SERVER["REQUEST_URI"])) {
- return $_SERVER["REQUEST_URI"];
- }else{
- return $_SERVER["PHP_SELF"] . (empty($_SERVER["QUERY_STRING"]) ? "" : "?" . $_SERVER["QUERY_STRING"]);
- }
-}
-
?>
diff -ru cacti-0.8.3a/include/tree_view_functions.php cacti-0.8.3/include/tree_view_functions.php
--- cacti-0.8.3a/include/tree_view_functions.php 2003-08-30 01:13:52.000000000 -0400
+++ cacti-0.8.3/include/tree_view_functions.php 2003-08-29 00:45:37.000000000 -0400
@@ -49,7 +49,7 @@
$sql_where = (empty($sql_where) ? "" : "and (" . $sql_where . " OR graph_tree_items.local_graph_id=0)");
$sql_join = "left join graph_local 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"] . "))";
+ left join user_auth_perms on ((graph_templates_graph.local_graph_id=user_auth_perms.item_id and user_auth_perms.type=1) OR (host.id=user_auth_perms.item_id and user_auth_perms.type=3) 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"] . ")";
}
$heirarchy = db_fetch_assoc("select
@@ -359,7 +359,7 @@
$sql_join = "left join graph_local on graph_templates_graph.local_graph_id=graph_local.id
left join host on host.id=graph_local.host_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"] . "))";
+ left join user_auth_perms on ((graph_templates_graph.local_graph_id=user_auth_perms.item_id and user_auth_perms.type=1) OR (host.id=user_auth_perms.item_id and user_auth_perms.type=3) 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"] . ")";
}
/* get information for the headers */
diff -ru cacti-0.8.3a/install/index.php cacti-0.8.3/install/index.php
--- cacti-0.8.3a/install/index.php 2003-08-30 01:13:52.000000000 -0400
+++ cacti-0.8.3/install/index.php 2003-08-29 00:45:37.000000000 -0400
@@ -33,7 +33,7 @@
include ("../include/config.php");
include ("../include/config_settings.php");
-$cacti_versions = array("0.8", "0.8.1", "0.8.2", "0.8.2a", "0.8.3", "0.8.3a");
+$cacti_versions = array("0.8", "0.8.1", "0.8.2", "0.8.2a", "0.8.3");
$old_cacti_version = db_fetch_cell("select cacti from version");
@@ -205,9 +205,6 @@
setcookie(session_name(),"",time() - 3600,"/");
- kill_session_var("sess_config_array");
- kill_session_var("sess_host_cache_array");
-
/* just in case we have hard drive graphs to deal with */
data_query(db_fetch_cell("select id from host where management_ip='127.0.0.1'"), 6);
@@ -403,26 +400,22 @@
$fail_text = "<span style='color: red; font-weight: bold; font-size: 12px;'>[Fail]</span>&";
$success_text = "<span style='color: green; font-weight: bold; font-size: 12px;'>[Success]</span>&";
- if (isset($_SESSION["sess_sql_install_cache"])) {
- while (list($index, $arr1) = each($_SESSION["sess_sql_install_cache"])) {
- while (list($version, $arr2) = each($arr1)) {
- while (list($status, $sql) = each($arr2)) {
- if ($current_version != $version) {
- $version_index = array_search($version, $cacti_versions);
- print "<p><strong>" . $cacti_versions{$version_index-1} . " -> " . $cacti_versions{$version_index} . "</strong></p>\n";
- }
-
- print "<p class='code'>" . (($status == 0) ? $fail_text : $success_text) . nl2br($sql) . "</p>\n";
-
- $current_version = $version;
+ while (list($index, $arr1) = each($_SESSION["sess_sql_install_cache"])) {
+ while (list($version, $arr2) = each($arr1)) {
+ while (list($status, $sql) = each($arr2)) {
+ if ($current_version != $version) {
+ $version_index = array_search($version, $cacti_versions);
+ print "<p><strong>" . $cacti_versions{$version_index-1} . " -> " . $cacti_versions{$version_index} . "</strong></p>\n";
}
+
+ print "<p class='code'>" . (($status == 0) ? $fail_text : $success_text) . nl2br($sql) . "</p>\n";
+
+ $current_version = $version;
}
}
-
- kill_session_var("sess_sql_install_cache");
- }else{
- print "<em>No SQL queries have been executed.</em>";
}
+
+ kill_session_var("sess_sql_install_cache");
?>
<?php }?>
Code: Select all
-bug#81: Partial/complete poller cache rebuild failure after an upgrade.
-bug#82: Undefined variable error messages under win32/IIS.
-bug: Problems with overlapping graph permissions with multiple users.