packages: cacti/cacti-PA.patch updated from cacti-plugin-0.8.7g-PA-v2.9.tar...
glen
glen at pld-linux.org
Wed Dec 15 19:40:10 CET 2010
Author: glen Date: Wed Dec 15 18:40:10 2010 GMT
Module: packages Tag: HEAD
---- Log message:
updated from cacti-plugin-0.8.7g-PA-v2.9.tar.gz :
filterdiff -p 1 -x 'images/*' cacti-plugin-arch/cacti-plugin-0.8.7g-PA-v2.9.diff > cacti-PA.patch
---- Files affected:
packages/cacti:
cacti-PA.patch (1.5 -> 1.6)
---- Diffs:
================================================================
Index: packages/cacti/cacti-PA.patch
diff -u packages/cacti/cacti-PA.patch:1.5 packages/cacti/cacti-PA.patch:1.6
--- packages/cacti/cacti-PA.patch:1.5 Mon Dec 13 11:06:01 2010
+++ packages/cacti/cacti-PA.patch Wed Dec 15 19:40:05 2010
@@ -1,6 +1,6 @@
-diff -Naur cacti-0.8.7g-old/auth_changepassword.php cacti-0.8.7g/auth_changepassword.php
---- cacti-0.8.7g-old/auth_changepassword.php 2010-07-09 18:33:46.000000000 -0400
-+++ cacti-0.8.7g/auth_changepassword.php 2010-07-09 18:34:11.000000000 -0400
+diff -Naur cacti-0.8.7g/auth_changepassword.php cacti-0.8.7g-PA-v2.9/auth_changepassword.php
+--- cacti-0.8.7g/auth_changepassword.php 2010-07-09 18:33:46.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/auth_changepassword.php 2010-10-17 20:09:52.000000000 -0400
@@ -59,6 +59,8 @@
header("Location: index.php"); break;
case '3': /* default graph page */
@@ -10,9 +10,9 @@
}
}else{
header("Location: graph_view.php");
-diff -Naur cacti-0.8.7g-old/auth_login.php cacti-0.8.7g/auth_login.php
---- cacti-0.8.7g-old/auth_login.php 2010-07-09 18:33:46.000000000 -0400
-+++ cacti-0.8.7g/auth_login.php 2010-07-09 18:34:11.000000000 -0400
+diff -Naur cacti-0.8.7g/auth_login.php cacti-0.8.7g-PA-v2.9/auth_login.php
+--- cacti-0.8.7g/auth_login.php 2010-07-09 18:33:46.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/auth_login.php 2010-10-17 20:09:52.000000000 -0400
@@ -124,10 +124,12 @@
}
@@ -144,8 +144,42 @@
</form>
</body>
</html>
---- cacti-0.8.7g/data_sources.php~ 2010-12-13 11:59:32.000000000 +0200
-+++ cacti-0.8.7g/data_sources.php 2010-12-13 12:00:13.152496733 +0200
+diff -Naur cacti-0.8.7g/cli/add_graph_template.php cacti-0.8.7g-PA-v2.9/cli/add_graph_template.php
+--- cacti-0.8.7g/cli/add_graph_template.php 2010-07-09 18:33:46.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/cli/add_graph_template.php 2010-10-17 20:09:52.000000000 -0400
+@@ -144,6 +144,7 @@
+ exit(1);
+ }else{
+ db_execute("replace into host_graph (host_id,graph_template_id) values (" . $host_id . "," . $graph_template_id . ")");
++ api_plugin_hook_function('add_graph_template_to_host', array("host_id" => $host_id, "graph_template_id" => $graph_template_id));
+ }
+
+ if (is_error_message()) {
+diff -Naur cacti-0.8.7g/cli/add_tree.php cacti-0.8.7g-PA-v2.9/cli/add_tree.php
+--- cacti-0.8.7g/cli/add_tree.php 2010-07-09 18:33:46.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/cli/add_tree.php 2010-10-17 20:09:52.000000000 -0400
+@@ -33,6 +33,7 @@
+ include(dirname(__FILE__)."/../include/global.php");
+ include_once($config["base_path"]."/lib/api_automation_tools.php");
+ include_once($config["base_path"].'/lib/tree.php');
++include_once($config["base_path"].'/lib/api_tree.php');
+
+ /* process calling arguments */
+ $parms = $_SERVER["argv"];
+diff -Naur cacti-0.8.7g/cli/host_update_template.php cacti-0.8.7g-PA-v2.9/cli/host_update_template.php
+--- cacti-0.8.7g/cli/host_update_template.php 2010-07-09 18:33:46.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/cli/host_update_template.php 2010-10-17 20:09:52.000000000 -0400
+@@ -136,6 +136,7 @@
+
+ foreach ($graph_templates as $graph_template) {
+ db_execute("REPLACE INTO host_graph (host_id, graph_template_id) VALUES (" . $host["id"] . ", " . $graph_template["graph_template_id"] . ")");
++ api_plugin_hook_function('add_graph_template_to_host', array("host_id" => $host_id, "graph_template_id" => $graph_template["graph_template_id"]));
+ }
+ }
+ }
+diff -Naur cacti-0.8.7g/data_sources.php cacti-0.8.7g-PA-v2.9/data_sources.php
+--- cacti-0.8.7g/data_sources.php 2010-09-19 21:39:05.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/data_sources.php 2010-10-17 20:09:52.000000000 -0400
@@ -44,6 +44,8 @@
7 => "Disable"
);
@@ -197,17 +231,21 @@
}
function get_poller_interval($seconds) {
-@@ -1323,6 +1323,7 @@
+@@ -1310,8 +1323,10 @@
$i = 0;
if (sizeof($data_sources) > 0) {
foreach ($data_sources as $data_source) {
++ $data_source["data_template_name"] = htmlspecialchars($data_source["data_template_name"]);
+ $data_source = api_plugin_hook_function('data_sources_table', $data_source);
/* we're escaping strings here, so no need to escape them on form_selectable_cell */
- $data_template_name = ((empty($data_source["data_template_name"])) ? "<em>None</em>" : htmlspecialchars($data_source["data_template_name"]));
+- $data_template_name = ((empty($data_source["data_template_name"])) ? "<em>None</em>" : htmlspecialchars($data_source["data_template_name"]));
++ $data_template_name = ((empty($data_source["data_template_name"])) ? "<em>None</em>" : $data_source["data_template_name"]);
$data_input_name = ((empty($data_source["data_input_name"])) ? "<em>External</em>" : htmlspecialchars($data_source["data_input_name"]));
-diff -Naur cacti-0.8.7g-old/graph_image.php cacti-0.8.7g/graph_image.php
---- cacti-0.8.7g-old/graph_image.php 2010-07-09 18:33:46.000000000 -0400
-+++ cacti-0.8.7g/graph_image.php 2010-07-09 18:34:11.000000000 -0400
+ $poller_interval = ((isset($poller_intervals[$data_source["local_data_id"]])) ? $poller_intervals[$data_source["local_data_id"]] : 0);
+ form_alternate_row_color($colors["alternate"], $colors["light"], $i, 'line' . $data_source["local_data_id"]); $i++;
+diff -Naur cacti-0.8.7g/graph_image.php cacti-0.8.7g-PA-v2.9/graph_image.php
+--- cacti-0.8.7g/graph_image.php 2010-07-09 18:33:46.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/graph_image.php 2010-10-17 20:09:52.000000000 -0400
@@ -44,6 +44,8 @@
/* flush the headers now */
ob_end_clean();
@@ -217,9 +255,9 @@
session_write_close();
$graph_data_array = array();
-diff -Naur cacti-0.8.7g-old/graph.php cacti-0.8.7g/graph.php
---- cacti-0.8.7g-old/graph.php 2010-07-09 18:33:46.000000000 -0400
-+++ cacti-0.8.7g/graph.php 2010-07-09 18:34:11.000000000 -0400
+diff -Naur cacti-0.8.7g/graph.php cacti-0.8.7g-PA-v2.9/graph.php
+--- cacti-0.8.7g/graph.php 2010-07-09 18:33:46.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/graph.php 2010-10-17 20:09:52.000000000 -0400
@@ -32,6 +32,8 @@
include_once("./lib/html_tree.php");
include_once("./include/top_graph_header.php");
@@ -229,14 +267,20 @@
/* ================= input validation ================= */
input_validate_input_regex(get_request_var("rra_id"), "^([0-9]+|all)$");
input_validate_input_number(get_request_var("local_graph_id"));
-@@ -94,17 +96,18 @@
- <table width='1' cellpadding='0'>
- <tr>
- <td>
-- <img class='graphimage' id='graph_<?php print $_GET["local_graph_id"] ?>' src='<?php print htmlspecialchars("graph_image.php?action=view&local_graph_id=" . $_GET["local_graph_id"] . "&rra_id=" . $rra["id"]);?>' border='0' alt='<?php print htmlspecialchars($graph_title);?>'>
-+ <img class='graphimage' id='graph_<?php print $_GET["local_graph_id"] ?>' src='<?php print htmlspecialchars("graph_image.php?action=view&local_graph_id=" . $_GET["local_graph_id"] . "&rra_id=" . $rra["id"]);?>' border='0' alt='<?php print htmlspecialchars($graph_title);?>'>
- </td>
- <td valign='top' style='padding: 3px;' class='noprint'>
+@@ -77,6 +79,12 @@
+
+ switch ($_REQUEST["action"]) {
+ case 'view':
++ do_hook_function('page_buttons',
++ array('lgid' => $_GET["local_graph_id"],
++ 'leafid' => '',//$leaf_id,
++ 'mode' => 'mrtg',
++ 'rraid' => $_GET["rra_id"])
++ );
+ ?>
+ <tr bgcolor='#<?php print $colors["header"];?>'>
+ <td colspan='3' class='textHeaderDark'>
+@@ -100,6 +108,7 @@
<a href='<?php print htmlspecialchars("graph.php?action=zoom&local_graph_id=" . $_GET["local_graph_id"]. "&rra_id=" . $rra["id"] . "&view_type=" . $_REQUEST["view_type"]);?>'><img src='images/graph_zoom.gif' border='0' alt='Zoom Graph' title='Zoom Graph' style='padding: 3px;'></a><br>
<a href='<?php print htmlspecialchars("graph_xport.php?local_graph_id=" . $_GET["local_graph_id"] . "&rra_id=" . $rra["id"] . "&view_type=" . $_REQUEST["view_type"]);?>'><img src='images/graph_query.png' border='0' alt='CSV Export' title='CSV Export' style='padding: 3px;'></a><br>
<a href='<?php print htmlspecialchars("graph.php?action=properties&local_graph_id=" . $_GET["local_graph_id"] . "&rra_id=" . $rra["id"] . "&view_type=" . $_REQUEST["view_type"]);?>'><img src='images/graph_properties.gif' border='0' alt='Graph Source/Properties' title='Graph Source/Properties' style='padding: 3px;'></a>
@@ -244,13 +288,15 @@
</td>
</tr>
<tr>
- <td colspan='2' align='center'>
-- <strong><?php print htmlspecialchars($rra["name"]);?></strong>
-+ <strong><?php print htmlspecialchars($rra["name"]);?></strong>
- </td>
- </tr>
- </table>
-@@ -215,6 +218,7 @@
+@@ -113,6 +122,7 @@
+ <?php
+ $i++;
+ }
++ do_hook_function('tree_view_page_end');
+ }
+
+ break;
+@@ -215,6 +225,7 @@
<td valign='top' style='padding: 3px;' class='noprint'>
<a href='<?php print htmlspecialchars("graph.php?action=properties&local_graph_id=" . $_GET["local_graph_id"] . "&rra_id=" . $_GET["rra_id"] . "&view_type=" . $_REQUEST["view_type"] . "&graph_start=" . $graph_start . "&graph_end=" . $graph_end);?>'><img src='images/graph_properties.gif' border='0' alt='Graph Source/Properties' title='Graph Source/Properties' style='padding: 3px;'></a>
<a href='<?php print htmlspecialchars("graph_xport.php?local_graph_id=" . $_GET["local_graph_id"] . "&rra_id=" . $_GET["rra_id"] . "&view_type=" . $_REQUEST["view_type"]);?>&graph_start=<?php print $graph_start;?>&graph_end=<?php print $graph_end;?>'><img src='images/graph_query.png' border='0' alt='CSV Export' title='CSV Export' style='padding: 3px;'></a><br>
@@ -258,7 +304,7 @@
</td>
</tr>
<tr>
-@@ -247,6 +251,7 @@
+@@ -247,6 +258,7 @@
<td valign='top' style='padding: 3px;'>
<a href='<?php print htmlspecialchars("graph.php?action=zoom&local_graph_id=" . $_GET["local_graph_id"] . "&rra_id=" . $_GET["rra_id"] . "&view_type=" . $_REQUEST["view_type"]);?>'><img src='images/graph_zoom.gif' border='0' alt='Zoom Graph' title='Zoom Graph' style='padding: 3px;'></a><br>
<a href='<?php print htmlspecialchars("graph_xport.php?local_graph_id=" . $_GET["local_graph_id"] . "&rra_id=" . $_GET["rra_id"] . "&view_type=" . $_REQUEST["view_type"]);?>'><img src='images/graph_query.png' border='0' alt='CSV Export' title='CSV Export' style='padding: 3px;'></a><br>
@@ -266,9 +312,9 @@
</td>
</tr>
<tr>
-diff -Naur cacti-0.8.7g-old/graphs_new.php cacti-0.8.7g/graphs_new.php
---- cacti-0.8.7g-old/graphs_new.php 2010-07-09 18:33:46.000000000 -0400
-+++ cacti-0.8.7g/graphs_new.php 2010-07-09 18:34:11.000000000 -0400
+diff -Naur cacti-0.8.7g/graphs_new.php cacti-0.8.7g-PA-v2.9/graphs_new.php
+--- cacti-0.8.7g/graphs_new.php 2010-07-09 18:33:46.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/graphs_new.php 2010-10-17 20:09:52.000000000 -0400
@@ -511,7 +511,8 @@
</td>
<td nowrap style='white-space: nowrap;' class="textInfo" align="center" valign="top">
@@ -279,9 +325,9 @@
</td>
</tr>
</table>
-diff -Naur cacti-0.8.7g-old/graphs.php cacti-0.8.7g/graphs.php
---- cacti-0.8.7g-old/graphs.php 2010-07-09 18:33:46.000000000 -0400
-+++ cacti-0.8.7g/graphs.php 2010-07-09 18:34:11.000000000 -0400
+diff -Naur cacti-0.8.7g/graphs.php cacti-0.8.7g-PA-v2.9/graphs.php
+--- cacti-0.8.7g/graphs.php 2010-09-19 21:39:05.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/graphs.php 2010-10-17 20:09:52.000000000 -0400
@@ -45,6 +45,8 @@
4 => "Convert to Graph Template"
);
@@ -313,9 +359,9 @@
}
}else{
print "<tr><td bgcolor='#" . $colors["form_alternate1"]. "'><span class='textError'>You must select at least one graph.</span></td></tr>\n";
-diff -Naur cacti-0.8.7g-old/host.php cacti-0.8.7g/host.php
---- cacti-0.8.7g-old/host.php 2010-07-09 18:33:46.000000000 -0400
-+++ cacti-0.8.7g/host.php 2010-07-09 18:34:11.000000000 -0400
+diff -Naur cacti-0.8.7g/host.php cacti-0.8.7g-PA-v2.9/host.php
+--- cacti-0.8.7g/host.php 2010-07-09 18:33:46.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/host.php 2010-10-17 20:09:52.000000000 -0400
@@ -44,6 +44,8 @@
6 => "Change Availability Options"
);
@@ -325,16 +371,24 @@
/* set default action */
if (!isset($_REQUEST["action"])) { $_REQUEST["action"] = ""; }
-@@ -305,6 +307,8 @@
+@@ -137,6 +139,7 @@
+ /* ==================================================== */
+
+ db_execute("replace into host_graph (host_id,graph_template_id) values (" . $_POST["id"] . "," . $_POST["graph_template_id"] . ")");
++ api_plugin_hook_function('add_graph_template_to_host', array("host_id" => $_POST["id"], "graph_template_id" => $_POST["graph_template_id"]));
+
+ header("Location: host.php?action=edit&id=" . $_POST["id"]);
+ exit;
+@@ -305,6 +308,8 @@
api_tree_item_save(0, $_POST["tree_id"], TREE_ITEM_TYPE_HOST, $_POST["tree_item_id"], "", 0, read_graph_config_option("default_rra_id"), $selected_items[$i], 1, 1, false);
}
+ } else {
-+ api_plugin_hook_function('device_action_execute', $_POST['drp_action']);
++ api_plugin_hook_function('device_action_execute', $_POST['drp_action']);
}
header("Location: host.php");
-@@ -450,6 +454,12 @@
+@@ -450,6 +455,12 @@
<input type='hidden' name='tree_id' value='" . $matches[1] . "'>\n
";
$save_html = "<input type='button' value='Cancel' onClick='window.history.back()'> <input type='submit' value='Continue' title='Place Device(s) on Tree'>";
@@ -347,7 +401,7 @@
}
}else{
print "<tr><td bgcolor='#" . $colors["form_alternate1"]. "'><span class='textError'>You must select at least one device.</span></td></tr>\n";
-@@ -532,6 +542,8 @@
+@@ -532,6 +543,8 @@
input_validate_input_number(get_request_var("id"));
/* ==================================================== */
@@ -356,7 +410,7 @@
if (!empty($_GET["id"])) {
$host = db_fetch_row("select * from host where id=" . $_GET["id"]);
$header_label = "[edit: " . htmlspecialchars($host["description"]) . "]";
-@@ -643,6 +655,7 @@
+@@ -643,6 +656,7 @@
<span style="color: #c16921;">*</span><a href="<?php print htmlspecialchars("graphs_new.php?host_id=" . $host["id"]);?>">Create Graphs for this Host</a><br>
<span style="color: #c16921;">*</span><a href="<?php print htmlspecialchars("data_sources.php?host_id=" . $host["id"] . "&ds_rows=30&filter=&template_id=-1&method_id=-1&page=1");?>">Data Source List</a><br>
<span style="color: #c16921;">*</span><a href="<?php print htmlspecialchars("graphs.php?host_id=" . $host["id"] . "&graph_rows=30&filter=&template_id=-1&page=1");?>">Graph List</a>
@@ -364,7 +418,7 @@
</td>
</tr>
</table>
-@@ -1107,6 +1120,8 @@
+@@ -1107,6 +1121,8 @@
}
form_save_button("host.php", "return");
@@ -373,10 +427,23 @@
}
function host() {
-diff -Naur cacti-0.8.7g-old/include/auth.php cacti-0.8.7g/include/auth.php
---- cacti-0.8.7g-old/include/auth.php 2010-07-09 18:33:46.000000000 -0400
-+++ cacti-0.8.7g/include/auth.php 2010-07-09 18:34:11.000000000 -0400
-@@ -31,6 +31,9 @@
+diff -Naur cacti-0.8.7g/images/disable_icon.png cacti-0.8.7g-PA-v2.9/images/disable_icon.png
+diff -Naur cacti-0.8.7g/images/enable_icon_disabled.png cacti-0.8.7g-PA-v2.9/images/enable_icon_disabled.png
+diff -Naur cacti-0.8.7g/images/enable_icon.png cacti-0.8.7g-PA-v2.9/images/enable_icon.png
+diff -Naur cacti-0.8.7g/images/install_icon_disabled.png cacti-0.8.7g-PA-v2.9/images/install_icon_disabled.png
+diff -Naur cacti-0.8.7g/images/install_icon.png cacti-0.8.7g-PA-v2.9/images/install_icon.png
+diff -Naur cacti-0.8.7g/images/uninstall_icon.gif cacti-0.8.7g-PA-v2.9/images/uninstall_icon.gif
+diff -Naur cacti-0.8.7g/images/view_none.gif cacti-0.8.7g-PA-v2.9/images/view_none.gif
+diff -Naur cacti-0.8.7g/include/auth.php cacti-0.8.7g-PA-v2.9/include/auth.php
+--- cacti-0.8.7g/include/auth.php 2010-07-09 18:33:46.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/include/auth.php 2010-10-17 20:09:52.000000000 -0400
+@@ -26,14 +26,17 @@
+
+ /* check to see if this is a new installation */
+ if (db_fetch_cell("select cacti from version") != $config["cacti_version"]) {
+- header ("Location: install/");
++ header ("Location: " . $config['url_path'] . "install/");
+ exit;
}
if (read_config_option("auth_method") != 0) {
@@ -385,7 +452,11 @@
+
/* handle change password dialog */
if ((isset($_SESSION['sess_change_password'])) && (read_config_option("webbasic_enabled") != "on")) {
- header ("Location: auth_changepassword.php?ref=" . (isset($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : "index.php"));
+- header ("Location: auth_changepassword.php?ref=" . (isset($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : "index.php"));
++ header ("Location: " . $config['url_path'] . "auth_changepassword.php?ref=" . (isset($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : "index.php"));
+ exit;
+ }
+
@@ -72,9 +75,9 @@
and user_auth_realm.realm_id='$realm_id'")) || (empty($realm_id)))) {
@@ -415,9 +486,9 @@
</tr>
<tr style='height:10px;'><td></td></tr>
<tr>
-diff -Naur cacti-0.8.7g-old/include/bottom_footer.php cacti-0.8.7g/include/bottom_footer.php
---- cacti-0.8.7g-old/include/bottom_footer.php 2010-07-09 18:33:46.000000000 -0400
-+++ cacti-0.8.7g/include/bottom_footer.php 2010-07-09 18:34:11.000000000 -0400
+diff -Naur cacti-0.8.7g/include/bottom_footer.php cacti-0.8.7g-PA-v2.9/include/bottom_footer.php
+--- cacti-0.8.7g/include/bottom_footer.php 2010-07-09 18:33:46.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/include/bottom_footer.php 2010-10-17 20:09:52.000000000 -0400
@@ -21,6 +21,10 @@
| http://www.cacti.net/ |
+-------------------------------------------------------------------------+
@@ -439,9 +510,9 @@
/* we use this session var to store field values for when a save fails,
this way we can restore the field's previous values. we reset it here, because
they only need to be stored for a single page */
-diff -Naur cacti-0.8.7g-old/include/config.php cacti-0.8.7g/include/config.php
---- cacti-0.8.7g-old/include/config.php 2010-07-09 18:33:46.000000000 -0400
-+++ cacti-0.8.7g/include/config.php 2010-07-09 18:34:11.000000000 -0400
+diff -Naur cacti-0.8.7g/include/config.php cacti-0.8.7g-PA-v2.9/include/config.php
+--- cacti-0.8.7g/include/config.php 2010-07-09 18:33:46.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/include/config.php 2010-10-17 20:09:52.000000000 -0400
@@ -30,6 +30,17 @@
$database_password = "cactiuser";
$database_port = "3306";
@@ -460,9 +531,9 @@
/* Default session name - Session name must contain alpha characters */
#$cacti_session_name = "Cacti";
-diff -Naur cacti-0.8.7g-old/include/global_arrays.php cacti-0.8.7g/include/global_arrays.php
---- cacti-0.8.7g-old/include/global_arrays.php 2010-07-09 18:33:46.000000000 -0400
-+++ cacti-0.8.7g/include/global_arrays.php 2010-07-09 18:34:11.000000000 -0400
+diff -Naur cacti-0.8.7g/include/global_arrays.php cacti-0.8.7g-PA-v2.9/include/global_arrays.php
+--- cacti-0.8.7g/include/global_arrays.php 2010-07-09 18:33:46.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/include/global_arrays.php 2010-10-17 20:09:52.000000000 -0400
@@ -22,6 +22,8 @@
+-------------------------------------------------------------------------+
*/
@@ -477,29 +548,28 @@
);
+$plugin_architecture = array(
-+ 'version' => '2.8'
++ 'version' => '2.9'
+ );
+
+api_plugin_hook('config_arrays');
+
?>
-diff -Naur cacti-0.8.7g-old/include/global_constants.php cacti-0.8.7g/include/global_constants.php
---- cacti-0.8.7g-old/include/global_constants.php 2010-07-09 18:33:46.000000000 -0400
-+++ cacti-0.8.7g/include/global_constants.php 2010-07-09 18:34:11.000000000 -0400
-@@ -173,4 +173,8 @@
+diff -Naur cacti-0.8.7g/include/global_constants.php cacti-0.8.7g-PA-v2.9/include/global_constants.php
+--- cacti-0.8.7g/include/global_constants.php 2010-07-09 18:33:46.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/include/global_constants.php 2010-10-17 20:09:52.000000000 -0400
+@@ -173,4 +173,9 @@
define("SNMP_CMDPHP", 1);
define("SNMP_WEBUI", 2);
--?>
+define('OPER_MODE_NATIVE', 0);
+define('OPER_MODE_RESKIN', 1);
+define('OPER_MODE_IFRAME_NONAV', 2);
++define('OPER_MODE_NOTABS', 3);
+
-+?>
-\ No newline at end of file
-diff -Naur cacti-0.8.7g-old/include/global_form.php cacti-0.8.7g/include/global_form.php
---- cacti-0.8.7g-old/include/global_form.php 2010-07-09 18:33:46.000000000 -0400
-+++ cacti-0.8.7g/include/global_form.php 2010-07-09 18:34:11.000000000 -0400
+ ?>
+diff -Naur cacti-0.8.7g/include/global_form.php cacti-0.8.7g-PA-v2.9/include/global_form.php
+--- cacti-0.8.7g/include/global_form.php 2010-07-09 18:33:46.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/include/global_form.php 2010-10-17 20:09:52.000000000 -0400
@@ -22,8 +22,9 @@
+-------------------------------------------------------------------------+
*/
@@ -521,9 +591,9 @@
+
+api_plugin_hook('config_form');
+
-diff -Naur cacti-0.8.7g-old/include/global.php cacti-0.8.7g/include/global.php
---- cacti-0.8.7g-old/include/global.php 2010-07-09 18:33:46.000000000 -0400
-+++ cacti-0.8.7g/include/global.php 2010-07-09 18:34:11.000000000 -0400
+diff -Naur cacti-0.8.7g/include/global.php cacti-0.8.7g-PA-v2.9/include/global.php
+--- cacti-0.8.7g/include/global.php 2010-07-09 18:33:46.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/include/global.php 2010-10-17 20:09:52.000000000 -0400
@@ -93,6 +93,13 @@
/* built-in snmp support */
$config["php_snmp_support"] = function_exists("snmpget");
@@ -569,9 +639,9 @@
/* current cacti version */
$config["cacti_version"] = "0.8.7g";
-diff -Naur cacti-0.8.7g-old/include/global_settings.php cacti-0.8.7g/include/global_settings.php
---- cacti-0.8.7g-old/include/global_settings.php 2010-07-09 18:33:46.000000000 -0400
-+++ cacti-0.8.7g/include/global_settings.php 2010-07-09 18:34:11.000000000 -0400
+diff -Naur cacti-0.8.7g/include/global_settings.php cacti-0.8.7g-PA-v2.9/include/global_settings.php
+--- cacti-0.8.7g/include/global_settings.php 2010-07-09 18:33:46.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/include/global_settings.php 2010-10-17 20:09:52.000000000 -0400
@@ -1190,4 +1190,6 @@
)
);
@@ -579,10 +649,10 @@
+api_plugin_hook('config_settings');
+
?>
-diff -Naur cacti-0.8.7g-old/include/plugins.php cacti-0.8.7g/include/plugins.php
---- cacti-0.8.7g-old/include/plugins.php 1969-12-31 19:00:00.000000000 -0500
-+++ cacti-0.8.7g/include/plugins.php 2010-07-09 18:34:11.000000000 -0400
-@@ -0,0 +1,38 @@
+diff -Naur cacti-0.8.7g/include/plugins.php cacti-0.8.7g-PA-v2.9/include/plugins.php
+--- cacti-0.8.7g/include/plugins.php 1969-12-31 19:00:00.000000000 -0500
++++ cacti-0.8.7g-PA-v2.9/include/plugins.php 2010-10-17 20:09:52.000000000 -0400
+@@ -0,0 +1,43 @@
+<?php
+
+/*
@@ -590,7 +660,7 @@
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ */
+
-+global $plugin_hooks, $plugins_system;
++global $plugin_hooks, $plugins_system, $plugins;
+$plugin_hooks = array();
+$plugins_system = array('settings', 'boost', 'dsstats');
+
@@ -610,10 +680,15 @@
+ * @param string $name Name of hook to fire
+ * @return mixed $data
+ */
++if (!is_array($plugins)) {
++ $plugins = array();
++}
+
+$oldplugins = read_config_option('oldplugins');
-+$oldplugins = explode(',', $oldplugins);
-+$plugins = array_merge($plugins, $oldplugins);
++if (strlen(trim($oldplugins))) {
++ $oldplugins = explode(',', $oldplugins);
++ $plugins = array_merge($plugins, $oldplugins);
++}
+
+/* On startup, register all plugins configured for use. */
+if (isset($plugins) && is_array($plugins)) {
@@ -621,22 +696,19 @@
+ use_plugin($name);
+ }
+}
-diff -Naur cacti-0.8.7g-old/include/top_graph_header.php cacti-0.8.7g/include/top_graph_header.php
---- cacti-0.8.7g-old/include/top_graph_header.php 2010-07-09 18:33:46.000000000 -0400
-+++ cacti-0.8.7g/include/top_graph_header.php 2010-07-09 18:34:11.000000000 -0400
-@@ -25,6 +25,11 @@
+diff -Naur cacti-0.8.7g/include/top_graph_header.php cacti-0.8.7g-PA-v2.9/include/top_graph_header.php
+--- cacti-0.8.7g/include/top_graph_header.php 2010-07-09 18:33:46.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/include/top_graph_header.php 2010-10-17 20:09:52.000000000 -0400
+@@ -25,6 +25,8 @@
$using_guest_account = false;
$show_console_tab = true;
+$oper_mode = api_plugin_hook_function('top_header', OPER_MODE_NATIVE);
-+if ($oper_mode == OPER_MODE_RESKIN) {
-+ return;
-+}
+
/* ================= input validation ================= */
input_validate_input_number(get_request_var_request("local_graph_id"));
input_validate_input_number(get_request_var_request("graph_start"));
-@@ -52,41 +57,53 @@
+@@ -52,49 +54,62 @@
$_SESSION["sess_nav_level_cache"][2]["url"] = "graph.php?local_graph_id=" . $_REQUEST["local_graph_id"] . "&rra_id=all";
}
@@ -704,8 +776,9 @@
</td>
</tr>
</table>
-@@ -94,7 +111,7 @@
+ </td>
</tr>
++<?php } elseif ($oper_mode == OPER_MODE_NOTABS) { api_plugin_hook_function('print_top_header'); } ?>
<tr style="height:2px;" bgcolor="#183c8f" class="noprint">
<td colspan="2">
- <img src="images/transparent_line.gif" style="height:2px;width:170px;" border="0"><br>
@@ -713,7 +786,7 @@
</td>
</tr>
<tr style="height:5px;" bgcolor="#e9e9e9" class="noprint">
-@@ -106,7 +123,7 @@
+@@ -106,7 +121,7 @@
</td>
<td align="right">
<?php if ((isset($_SESSION["sess_user_id"])) && ($using_guest_account == false)) { ?>
@@ -722,7 +795,7 @@
<?php } ?>
</td>
</tr>
-@@ -114,10 +131,10 @@
+@@ -114,10 +129,10 @@
</td>
</tr>
<tr class="noprint">
@@ -736,18 +809,18 @@
</td>
</tr>
-@@ -143,6 +160,8 @@
+@@ -143,6 +158,8 @@
</td>
</tr>
<?php }
-+ }
++
+ global $graph_views;
load_current_session_value("action", "sess_cacti_graph_action", $graph_views[read_graph_config_option("default_tree_view_mode")]);
?>
<tr>
-diff -Naur cacti-0.8.7g-old/include/top_header.php cacti-0.8.7g/include/top_header.php
---- cacti-0.8.7g-old/include/top_header.php 2010-07-09 18:33:46.000000000 -0400
-+++ cacti-0.8.7g/include/top_header.php 2010-07-09 18:34:11.000000000 -0400
+diff -Naur cacti-0.8.7g/include/top_header.php cacti-0.8.7g-PA-v2.9/include/top_header.php
+--- cacti-0.8.7g/include/top_header.php 2010-07-09 18:33:46.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/include/top_header.php 2010-10-17 20:09:52.000000000 -0400
@@ -22,38 +22,53 @@
+-------------------------------------------------------------------------+
*/
@@ -756,7 +829,7 @@
+global $colors, $config;
+
+$oper_mode = api_plugin_hook_function('top_header', OPER_MODE_NATIVE);
-+if ($oper_mode == OPER_MODE_RESKIN) {
++if ($oper_mode == OPER_MODE_RESKIN || $oper_mode == OPER_MODE_NOTABS) {
+ return;
+}
+
@@ -853,9 +926,9 @@
+ <tr>
+ <td width="100%" valign="top"><?php display_output_messages();?>
+<?php } ?>
-diff -Naur cacti-0.8.7g-old/index.php cacti-0.8.7g/index.php
---- cacti-0.8.7g-old/index.php 2010-07-09 18:33:46.000000000 -0400
-+++ cacti-0.8.7g/index.php 2010-07-09 18:34:11.000000000 -0400
+diff -Naur cacti-0.8.7g/index.php cacti-0.8.7g-PA-v2.9/index.php
+--- cacti-0.8.7g/index.php 2010-07-09 18:33:46.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/index.php 2010-10-17 20:09:52.000000000 -0400
@@ -25,6 +25,8 @@
include("./include/auth.php");
include("./include/top_header.php");
@@ -874,9 +947,130 @@
include("./include/bottom_footer.php");
?>
-diff -Naur cacti-0.8.7g-old/lib/api_device.php cacti-0.8.7g/lib/api_device.php
---- cacti-0.8.7g-old/lib/api_device.php 2010-07-09 18:33:46.000000000 -0400
-+++ cacti-0.8.7g/lib/api_device.php 2010-07-09 18:34:11.000000000 -0400
+diff -Naur cacti-0.8.7g/lib/api_automation_tools.php cacti-0.8.7g-PA-v2.9/lib/api_automation_tools.php
+--- cacti-0.8.7g/lib/api_automation_tools.php 2010-07-09 18:33:46.000000000 -0400
++++ cacti-0.8.7g-PA-v2.9/lib/api_automation_tools.php 2010-10-17 20:09:52.000000000 -0400
+@@ -22,117 +22,6 @@
+ +-------------------------------------------------------------------------+
+ */
+
+-function api_tree_item_save($id, $tree_id, $type, $parent_tree_item_id,
+- $title, $local_graph_id, $rra_id, $host_id, $host_grouping_type,
+- $sort_children_type, $propagate_changes) {
+-
+- global $config;
+-
+- include_once($config["library_path"] . "/tree.php");
+-
+- $parent_order_key = db_fetch_cell("select order_key from graph_tree_items where id=$parent_tree_item_id");
+-
+- /* fetch some cache variables */
+- if (empty($id)) {
+- /* new/save - generate new order key */
+- $order_key = get_next_tree_id($parent_order_key, "graph_tree_items", "order_key", "graph_tree_id=$tree_id");
+- }else{
+- /* edit/save - use old order_key */
+- $order_key = db_fetch_cell("select order_key from graph_tree_items where id=$id");
+- }
+-
+- /* duplicate graph check */
+- $search_key = substr($parent_order_key, 0, (tree_tier($parent_order_key) * CHARS_PER_TIER));
+- if (($type == TREE_ITEM_TYPE_GRAPH) && (sizeof(db_fetch_assoc("select id from graph_tree_items where local_graph_id='$local_graph_id' and graph_tree_id='$tree_id' and order_key like '$search_key" . str_repeat('_', CHARS_PER_TIER) . str_repeat('0', (MAX_TREE_DEPTH * CHARS_PER_TIER) - (strlen($search_key) + CHARS_PER_TIER)) . "'")) > 0)) {
+- return db_fetch_cell("select id from graph_tree_items where local_graph_id='$local_graph_id' and graph_tree_id='$tree_id' and order_key like '$search_key" . str_repeat('_', CHARS_PER_TIER) . str_repeat('0', (MAX_TREE_DEPTH * CHARS_PER_TIER) - (strlen($search_key) + CHARS_PER_TIER)) . "'");
+- }
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/cacti/cacti-PA.patch?r1=1.5&r2=1.6&f=u
More information about the pld-cvs-commit
mailing list