packages: cacti/cacti.spec, cacti/cacti-PA.patch, cacti/cacti-log-verbosity...
zawadaa
zawadaa at pld-linux.org
Fri May 28 10:05:40 CEST 2010
Author: zawadaa Date: Fri May 28 08:05:40 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- up to 0.8.7f
- works for me
---- Files affected:
packages/cacti:
cacti.spec (1.123 -> 1.124) , cacti-PA.patch (1.1 -> 1.2) , cacti-log-verbosity.patch (1.2 -> 1.3) , host_name-url.patch (1.2 -> 1.3)
---- Diffs:
================================================================
Index: packages/cacti/cacti.spec
diff -u packages/cacti/cacti.spec:1.123 packages/cacti/cacti.spec:1.124
--- packages/cacti/cacti.spec:1.123 Fri May 7 13:38:15 2010
+++ packages/cacti/cacti.spec Fri May 28 10:05:35 2010
@@ -3,26 +3,20 @@
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: 11
+Version: 0.8.7f
+Release: 1
License: GPL
Group: Applications/WWW
Source0: http://www.cacti.net/downloads/%{name}-%{version}.tar.gz
-# Source0-md5: 7563a58a57d2c6cc0da28cc341a30969
+# Source0-md5: c50a49e3b439dba1fd44ddc34276d4df
Source1: %{name}.cfg.php
Source2: %{name}.crontab
Source3: %{name}-apache.conf
Source4: %{name}-lighttpd.conf
Source5: %{name}-rrdpath.sql
Source6: %{name}-pa.sql
-Patch100: http://www.cacti.net/downloads/patches/0.8.7e/cli_add_graph.patch
-Patch101: http://www.cacti.net/downloads/patches/0.8.7e/snmp_invalid_response.patch
-Patch102: http://www.cacti.net/downloads/patches/0.8.7e/template_duplication.patch
-Patch103: http://www.cacti.net/downloads/patches/0.8.7e/fix_icmp_on_windows_iis_servers.patch
-Patch104: http://www.cacti.net/downloads/patches/0.8.7e/cross_site_fix.patch
-Patch105: http://www.cacti.net/downloads/patches/0.8.7e/sql_injection_template_export.patch
# http://cactiusers.org/wiki/PluginArchitectureInstall
-# http://mirror.cactiusers.org/downloads/plugins/cacti-plugin-0.8.7e-PA-v2.6.zip
+# http://mirror.cactiusers.org/downloads/plugins/cacti-plugin-0.8.7f-PA-v2.7.tar.gz
Patch0: %{name}-PA.patch
Patch1: %{name}-config.patch
Patch2: %{name}-adodb.patch
@@ -31,9 +25,8 @@
Patch5: %{name}-linux_memory.patch
Patch6: %{name}-log-verbosity.patch
Patch7: %{name}-ss_disk-array-indices.patch
-Patch8: %{name}-rrdresourcecheck.patch
-Patch9: host_name-url.patch
-Patch10: cli-relpath.patch
+Patch8: host_name-url.patch
+Patch9: cli-relpath.patch
URL: http://www.cacti.net/
BuildRequires: rpm-perlprov
BuildRequires: sed >= 4.0
@@ -120,12 +113,6 @@
%prep
%setup -q
-%patch100 -p1
-%patch101 -p1
-%patch102 -p1
-%patch103 -p1
-%patch104 -p1
-%patch105 -p1
%patch0 -p1
%patch1 -p1
%patch2 -p1
@@ -136,7 +123,6 @@
%patch7 -p1
%patch8 -p1
%patch9 -p1
-%patch10 -p1
mkdir -p sql
mv *.sql sql
@@ -165,7 +151,6 @@
find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
-rm log/.placeholder
# make sure cacti runs out of the box
sed -e "s,new_install,%{version}," -i sql/cacti.sql
@@ -276,6 +261,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.124 2010/05/28 08:05:35 zawadaa
+- up to 0.8.7f
+- works for me
+
Revision 1.123 2010/05/07 11:38:15 pawelz
- added sql_injection_template_export.patch. Resolves: CVE-2010-1431
- rel 11
================================================================
Index: packages/cacti/cacti-PA.patch
diff -u packages/cacti/cacti-PA.patch:1.1 packages/cacti/cacti-PA.patch:1.2
--- packages/cacti/cacti-PA.patch:1.1 Tue Apr 13 21:38:07 2010
+++ packages/cacti/cacti-PA.patch Fri May 28 10:05:35 2010
@@ -1,6 +1,6 @@
-diff -Naur cacti-0.8.7e-old/auth_changepassword.php cacti-0.8.7e/auth_changepassword.php
---- cacti-0.8.7e-old/auth_changepassword.php 2009-06-28 11:07:11.000000000 -0500
-+++ cacti-0.8.7e/auth_changepassword.php 2009-11-21 23:06:16.000000000 -0600
+diff -Naur cacti-0.8.7f-old/auth_changepassword.php cacti-0.8.7f/auth_changepassword.php
+--- cacti-0.8.7f-old/auth_changepassword.php 2010-05-20 14:02:08.000000000 -0500
++++ cacti-0.8.7f/auth_changepassword.php 2010-05-17 06:21:16.000000000 -0500
@@ -59,6 +59,8 @@
header("Location: index.php"); break;
case '3': /* default graph page */
@@ -10,19 +10,81 @@
}
}else{
header("Location: graph_view.php");
-diff -Naur cacti-0.8.7e-old/auth_login.php cacti-0.8.7e/auth_login.php
---- cacti-0.8.7e-old/auth_login.php 2009-06-28 11:07:11.000000000 -0500
-+++ cacti-0.8.7e/auth_login.php 2009-11-21 23:06:16.000000000 -0600
-@@ -212,6 +212,8 @@
- header("Location: index.php"); break;
+diff -Naur cacti-0.8.7f-old/auth_login.php cacti-0.8.7f/auth_login.php
+--- cacti-0.8.7f-old/auth_login.php 2010-05-20 14:02:08.000000000 -0500
++++ cacti-0.8.7f/auth_login.php 2010-05-17 06:21:16.000000000 -0500
+@@ -122,10 +122,12 @@
+ }
+
+ default:
+- /* Builtin Auth */
+- if ((!$user_auth) && (!$ldap_error)) {
+- /* if auth has not occured process for builtin - AKA Ldap fall through */
+- $user = db_fetch_row("SELECT * FROM user_auth WHERE username = '" . $username . "' AND password = '" . md5(get_request_var_post("login_password")) . "' AND realm = 0");
++ if (!api_plugin_hook_function('login_process', false)) {
++ /* Builtin Auth */
++ if ((!$user_auth) && (!$ldap_error)) {
++ /* if auth has not occured process for builtin - AKA Ldap fall through */
++ $user = db_fetch_row("SELECT * FROM user_auth WHERE username = '" . $username . "' AND password = '" . md5(get_request_var_post("login_password")) . "' AND realm = 0");
++ }
+ }
+ }
+ /* end of switch */
+@@ -187,29 +189,35 @@
+ decide what to do next */
+ switch ($user["login_opts"]) {
+ case '1': /* referer */
+- if (sizeof(db_fetch_assoc("SELECT realm_id FROM user_auth_realm WHERE realm_id = 8 AND user_id = " . $_SESSION["sess_user_id"])) == 0) {
+- header("Location: graph_view.php");
+- }else{
+- if (isset($_SERVER["HTTP_REFERER"])) {
+- $referer = $_SERVER["HTTP_REFERER"];
+- if (basename($referer) == "logout.php") {
+- $referer = "index.php";
+- }
+- } else if (isset($_SERVER["REQUEST_URI"])) {
+- $referer = $_SERVER["REQUEST_URI"];
+- if (basename($referer) == "logout.php") {
+- $referer = "index.php";
+- }
+- } else {
+- $referer = "index.php";
++ /* because we use plugins, we can't redirect back to graph_view.php if they don't
++ * have console access
++ */
++ if (isset($_SERVER["HTTP_REFERER"])) {
++ $referer = $_SERVER["HTTP_REFERER"];
++ if (basename($referer) == "logout.php") {
++ $referer = $config['url_path'] . "index.php";
+ }
+- header("Location: " . $referer);
++ } else if (isset($_SERVER["REQUEST_URI"])) {
++ $referer = $_SERVER["REQUEST_URI"];
++ if (basename($referer) == "logout.php") {
++ $referer = $config['url_path'] . "index.php";
++ }
++ } else {
++ $referer = $config['url_path'] . "index.php";
+ }
++ header("Location: " . $referer);
++
+ break;
+ case '2': /* default console page */
+- header("Location: index.php"); break;
++ header("Location: " . $config['url_path'] . "index.php");
++
++ break;
case '3': /* default graph page */
- header("Location: graph_view.php"); break;
+- header("Location: graph_view.php"); break;
++ header("Location: " . $config['url_path'] . "graph_view.php");
++
++ break;
+ default:
+ api_plugin_hook_function('login_options_navigate', $user['login_opts']);
}
exit;
-
-@@ -262,9 +264,17 @@
+ }else{
+@@ -260,9 +268,17 @@
<body bgcolor="#FFFFFF" onload="document.login.login_username.focus()">
<form name="login" method="post" action="<?php print basename($_SERVER["PHP_SELF"]);?>">
<input type="hidden" name="action" value="login">
@@ -37,11 +99,38 @@
<table align="center">
<tr>
- <td colspan="2"><img src="images/auth_login.gif" border="0" alt=""></td>
-+ <td colspan="2"><center><?php if ($cacti_logo != '') { ?><img src="<?php echo $cacti_logo; ?>" border="0" alt=""><?php } ?></center></td>
++ <td colspan="2"><center><?php if ($cacti_logo != '') { ?><img src="<?php echo $cacti_logo; ?>" border="0" alt=""><?php } ?></center></td>
</tr>
<?php
-@@ -317,6 +327,7 @@
+@@ -299,22 +315,29 @@
+ <td><input type="password" name="login_password" size="40" style="width: 295px;"></td>
+ </tr>
+ <?php
+- if (read_config_option("auth_method") == "3") {?>
++ if (read_config_option("auth_method") == "3" || api_plugin_hook_function('login_realms_exist')) {
++ $realms = api_plugin_hook_function('login_realms', array("local" => array("name" => "Local", "selected" => false), "ldap" => array("name" => "LDAP", "selected" => true)));
++ ?>
+ <tr>
+ <td>Realm:</td>
+ <td>
+- <select name="realm" style="width: 295px;">
+- <option value="local">Local</option>
+- <option value="ldap" selected>LDAP</option>
++ <select name="realm" style="width: 295px;"><?php
++ if (sizeof($realms)) {
++ foreach($realms as $name => $realm) {
++ print "\t\t\t\t\t<option value='" . $name . "'" . ($realm["selected"] ? " selected":"") . ">" . $realm["name"] . "</option>\n";
++ }
++ }
++ ?>
+ </select>
+ </td>
+- </tr>
++ </tr>
+ <?php }?>
+ <tr style="height:10px;"><td></td></tr>
+ <tr>
<td><input type="submit" value="Login"></td>
</tr>
</table>
@@ -49,9 +138,9 @@
</form>
</body>
</html>
-diff -Naur cacti-0.8.7e-old/data_sources.php cacti-0.8.7e/data_sources.php
---- cacti-0.8.7e-old/data_sources.php 2009-06-28 11:07:11.000000000 -0500
-+++ cacti-0.8.7e/data_sources.php 2009-11-21 23:06:16.000000000 -0600
+diff -Naur cacti-0.8.7f-old/data_sources.php cacti-0.8.7f/data_sources.php
+--- cacti-0.8.7f-old/data_sources.php 2010-05-20 14:02:08.000000000 -0500
++++ cacti-0.8.7f/data_sources.php 2010-05-18 12:24:16.000000000 -0500
@@ -44,6 +44,8 @@
7 => "Disable"
);
@@ -61,33 +150,30 @@
/* set default action */
if (!isset($_REQUEST["action"])) { $_REQUEST["action"] = ""; }
-@@ -402,7 +404,10 @@
+@@ -402,6 +404,8 @@
api_reapply_suggested_data_source_title($selected_items[$i]);
update_data_source_title_cache($selected_items[$i]);
}
+ } else {
+ api_plugin_hook_function('data_source_action_execute', $_POST['drp_action']);
}
-+
header("Location: data_sources.php");
exit;
- }
-@@ -533,7 +538,12 @@
- <p>$ds_list</p>
- </td>
- </tr>\n
-- ";
-+ ";
-+ } else {
-+ $save['drp_action'] = $_POST['drp_action'];
-+ $save['ds_list'] = $ds_list;
-+ $save['ds_array'] = (isset($ds_array)? $ds_array : array());
-+ api_plugin_hook_function('data_source_action_prepare', $save);
- }
-
- if (!isset($ds_array)) {
-@@ -675,6 +685,8 @@
- input_validate_input_number(get_request_var("id"));
+@@ -545,6 +549,12 @@
+ </tr>\n
+ ";
+ $save_html = "<input type='button' value='Cancel' onClick='window.history.back()'> <input type='submit' value='Continue' title='Reapply Suggested Naming to Data Source(s)'>";
++ }else{
++ $save['drp_action'] = $_POST['drp_action'];
++ $save['ds_list'] = $ds_list;
++ $save['ds_array'] = (isset($ds_array)? $ds_array : array());
++ api_plugin_hook_function('data_source_action_prepare', $save);
++ $save_html = "<input type='button' value='Cancel' onClick='window.history.back()'> <input type='submit' value='Continue'>";
+ }
+ }else{
+ print "<tr><td bgcolor='#" . $colors["form_alternate1"]. "'><span class='textError'>You must select at least one data source.</span></td></tr>\n";
+@@ -683,6 +693,8 @@
+ input_validate_input_number(get_request_var("host_id"));
/* ==================================================== */
+ api_plugin_hook('data_source_edit_top');
@@ -95,7 +181,7 @@
$use_data_template = true;
$host_id = 0;
-@@ -967,8 +979,9 @@
+@@ -975,8 +987,9 @@
form_save_button("data_sources.php");
@@ -106,7 +192,7 @@
}
function get_poller_interval($seconds) {
-@@ -1300,6 +1313,7 @@
+@@ -1310,6 +1323,7 @@
$i = 0;
if (sizeof($data_sources) > 0) {
foreach ($data_sources as $data_source) {
@@ -114,14 +200,9 @@
$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>" : $data_source["data_input_name"]);
$poller_interval = ((isset($poller_intervals[$data_source["local_data_id"]])) ? $poller_intervals[$data_source["local_data_id"]] : 0);
-@@ -1328,4 +1342,3 @@
- print "</form>\n";
- }
- ?>
--
-diff -Naur cacti-0.8.7e-old/graph_image.php cacti-0.8.7e/graph_image.php
---- cacti-0.8.7e-old/graph_image.php 2009-06-28 11:07:11.000000000 -0500
-+++ cacti-0.8.7e/graph_image.php 2009-11-21 23:06:16.000000000 -0600
+diff -Naur cacti-0.8.7f-old/graph_image.php cacti-0.8.7f/graph_image.php
+--- cacti-0.8.7f-old/graph_image.php 2010-05-20 14:02:08.000000000 -0500
++++ cacti-0.8.7f/graph_image.php 2010-05-17 06:21:16.000000000 -0500
@@ -44,6 +44,8 @@
/* flush the headers now */
ob_end_clean();
@@ -131,49 +212,136 @@
session_write_close();
$graph_data_array = array();
-diff -Naur cacti-0.8.7e-old/graph.php cacti-0.8.7e/graph.php
---- cacti-0.8.7e-old/graph.php 2009-11-21 23:31:26.000000000 -0600
-+++ cacti-0.8.7e/graph.php 2009-11-21 23:06:16.000000000 -0600
+diff -Naur cacti-0.8.7f-old/graph.php cacti-0.8.7f/graph.php
+--- cacti-0.8.7f-old/graph.php 2010-05-20 14:02:08.000000000 -0500
++++ cacti-0.8.7f/graph.php 2010-05-17 06:21:16.000000000 -0500
@@ -100,6 +100,7 @@
- <a href='graph.php?action=zoom&local_graph_id=<?php print $_GET["local_graph_id"];?>&rra_id=<?php print $rra["id"];?>&view_type=<?php print $_REQUEST["view_type"];?>'><img src='images/graph_zoom.gif' border='0' alt='Zoom Graph' title='Zoom Graph' style='padding: 3px;'></a><br>
- <a href='graph_xport.php?local_graph_id=<?php print $_GET["local_graph_id"];?>&rra_id=<?php print $rra["id"];?>&view_type=<?php print $_REQUEST["view_type"];?>'><img src='images/graph_query.png' border='0' alt='CSV Export' title='CSV Export' style='padding: 3px;'></a><br>
- <a href='graph.php?action=properties&local_graph_id=<?php print $_GET["local_graph_id"];?>&rra_id=<?php print $rra["id"];?>&view_type=<?php print $_REQUEST["view_type"];?>'><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.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>
+ <?php api_plugin_hook('graph_buttons', array('hook' => 'view', 'local_graph_id' => $_GET['local_graph_id'], 'rra' => $rra['id'], 'view_type' => $_REQUEST['view_type'])); ?>
</td>
</tr>
<tr>
-@@ -214,6 +215,7 @@
+@@ -215,6 +216,7 @@
<td valign='top' style='padding: 3px;' class='noprint'>
- <a href='graph.php?action=properties&local_graph_id=<?php print $_GET["local_graph_id"];?>&rra_id=<?php print $_GET["rra_id"];?>&view_type=<?php print $_REQUEST["view_type"];?>&graph_start=<?php print $graph_start;?>&graph_end=<?php print $graph_end;?>'><img src='images/graph_properties.gif' border='0' alt='Graph Source/Properties' title='Graph Source/Properties' style='padding: 3px;'></a>
- <a href='graph_xport.php?local_graph_id=<?php print $_GET["local_graph_id"];?>&rra_id=<?php print $_GET["rra_id"];?>&view_type=<?php print $_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>
+ <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>
+ <?php api_plugin_hook('graph_buttons', array('hook' => 'zoom', 'local_graph_id' => $_GET['local_graph_id'], 'rra' => $_GET['rra_id'], 'view_type' => $_REQUEST['view_type'])); ?>
</td>
</tr>
<tr>
-@@ -246,6 +248,7 @@
+@@ -247,6 +249,7 @@
<td valign='top' style='padding: 3px;'>
- <a href='graph.php?action=zoom&local_graph_id=<?php print $_GET["local_graph_id"];?>&rra_id=<?php print $_GET["rra_id"];?>&view_type=<?php print $_REQUEST["view_type"];?>'><img src='images/graph_zoom.gif' border='0' alt='Zoom Graph' title='Zoom Graph' style='padding: 3px;'></a><br>
- <a href='graph_xport.php?local_graph_id=<?php print $_GET["local_graph_id"];?>&rra_id=<?php print $_GET["rra_id"];?>&view_type=<?php print $_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=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>
+ <?php api_plugin_hook('graph_buttons', array('hook' => 'properties', 'local_graph_id' => $_GET['local_graph_id'], 'rra' => $_GET['rra_id'], 'view_type' => $_REQUEST['view_type'])); ?>
</td>
</tr>
<tr>
-diff -Naur cacti-0.8.7e-old/graphs_new.php cacti-0.8.7e/graphs_new.php
---- cacti-0.8.7e-old/graphs_new.php 2009-06-28 11:07:11.000000000 -0500
-+++ cacti-0.8.7e/graphs_new.php 2009-11-21 23:06:16.000000000 -0600
-@@ -479,7 +479,8 @@
+diff -Naur cacti-0.8.7f-old/graphs_new.php cacti-0.8.7f/graphs_new.php
+--- cacti-0.8.7f-old/graphs_new.php 2010-05-20 14:02:08.000000000 -0500
++++ cacti-0.8.7f/graphs_new.php 2010-05-18 06:18:40.000000000 -0500
+@@ -397,7 +397,7 @@
+ if (!empty($debug_log)) {
+ debug_log_clear("new_graphs");
+ ?>
+- <div id='message' style='display:none;color:#FFFFFF;background-color:"#<?php print $colors["light"];?>;border:1px solid #00438C;'>
++ <div id='message' style='color:#FFFFFF;background-color:"#<?php print $colors["light"];?>;border:1px solid #00438C;'>
+ <?php print "<center style='font-size:16pt;background-color:#" . $colors["header"] . ";text-align:center;'>Graphs Created</center>";?>
+ <?php print "<ul style='text-align:left;white-space:nowrap;color:#000000;padding:5px 20px;'>" . $debug_log . "</ul>";?>
+ </div>
+@@ -407,40 +407,45 @@
+ <script type="text/javascript">
+ <!--
+ var obj = document.getElementById('message');
+- if (window.innerHeight) {
+- height = window.innerHeight;
+- width = window.innerWidth;
+- }else{
+- height = document.body.clientHeight;
+- width = document.body.clientWidth;
+- }
+- var opacity=1;
+-
+- obj.style.position = "absolute";
+- obj.style.backgroundColor = "#EAEAEA";
+- obj.style.padding = "5px 5px";
+- obj.style.display = "";
+- cw = obj.offsetWidth;
+- // Adjust for IE6
+- if (!cw) cw = 150;
+- ch = obj.offsetHeight;
+- obj.style.top = '150px';
+- obj.style.left = ((width/2) - (cw / 2) - 165)+'px';
+- obj.style.border = 'medium solid #AEAEAE';
+- opacity = 1;
+- obj.style.opacity = opacity;
+- obj.zoom = "100%";
+- if (document.getElementById('message')) {
+- setTimeout("removeMessage()", 4000);
+- }
+
+- function removeMessage() {
+- if (obj.style.opacity <= 0) return;
+- opacity-=0.15;
+- iopacity = opacity * 100;
++ if (obj) {
++ if (window.innerHeight) {
++ height = window.innerHeight;
++ width = window.innerWidth;
++ }else{
++ height = document.body.clientHeight;
++ width = document.body.clientWidth;
++ }
++ var opacity=1;
++
++ obj.style.position = "absolute";
++ obj.style.backgroundColor = "#EAEAEA";
++ obj.style.padding = "5px 5px";
++ obj.style.display = "";
++ cw = obj.offsetWidth;
++ // Adjust for IE6
++ if (!cw) cw = 150;
++ ch = obj.offsetHeight;
++ obj.style.top = '150px';
++ obj.style.left = ((width/2) - (cw / 2) - 165)+'px';
++ obj.style.border = 'medium solid #AEAEAE';
++ opacity = 1;
+ obj.style.opacity = opacity;
+- obj.style.filter = 'alpha(opacity='+iopacity+')';
+- setTimeout("removeMessage()",40);
++ obj.zoom = "100%";
++ if (document.getElementById('message')) {
++
++
++ setTimeout("removeMessage()", 4000);
++ }
++
++ function removeMessage() {
++ if (obj.style.opacity <= 0) return;
++ opacity-=0.15;
++ iopacity = opacity * 100;
++ obj.style.opacity = opacity;
++ obj.style.filter = 'alpha(opacity='+iopacity+')';
++ setTimeout("removeMessage()",40);
++ }
+ }
+
+ function applyGraphsNewFilterChange(objForm) {
+@@ -514,7 +519,8 @@
</td>
<td nowrap style='white-space: nowrap;' class="textInfo" align="center" valign="top">
- <span style="white-space: nowrap; color: #c16921;">*</span><a href="host.php?action=edit&id=<?php print $_REQUEST["host_id"];?>">Edit this Host</a><br>
-- <span style="white-space: nowrap; color: #c16921;">*</span><a href="host.php?action=edit">Create New Host</a>
-+ <span style="white-space: nowrap; color: #c16921;">*</span><a href="host.php?action=edit">Create New Host</a><br>
+ <span style="white-space: nowrap; color: #c16921;">*</span><a href="<?php print htmlspecialchars("host.php?action=edit&id=" . $_REQUEST["host_id"]);?>">Edit this Host</a><br>
+- <span style="white-space: nowrap; color: #c16921;">*</span><a href="<?php print htmlspecialchars("host.php?action=edit");?>">Create New Host</a>
++ <span style="white-space: nowrap; color: #c16921;">*</span><a href="<?php print htmlspecialchars("host.php?action=edit");?>">Create New Host</a><br>
+ <?php api_plugin_hook('graphs_new_top_links'); ?>
</td>
</tr>
</table>
-diff -Naur cacti-0.8.7e-old/graphs.php cacti-0.8.7e/graphs.php
---- cacti-0.8.7e-old/graphs.php 2009-06-28 11:07:11.000000000 -0500
-+++ cacti-0.8.7e/graphs.php 2009-11-21 23:06:16.000000000 -0600
+diff -Naur cacti-0.8.7f-old/graphs.php cacti-0.8.7f/graphs.php
+--- cacti-0.8.7f-old/graphs.php 2010-05-20 14:02:08.000000000 -0500
++++ cacti-0.8.7f/graphs.php 2010-05-18 06:22:28.000000000 -0500
@@ -45,6 +45,8 @@
4 => "Convert to Graph Template"
);
@@ -183,33 +351,31 @@
/* set default action */
if (!isset($_REQUEST["action"])) { $_REQUEST["action"] = ""; }
-@@ -360,8 +362,10 @@
- input_validate_input_number($selected_items[$i]);
- /* ==================================================== */
+@@ -362,6 +364,8 @@
-- api_resize_graphs($selected_items[$i], $_POST["graph_width"], $_POST["graph_height"]);
-+ api_resize_graphs($selected_items[$i], $_POST['graph_width'], $_POST['graph_height']);
+ api_resize_graphs($selected_items[$i], $_POST["graph_width"], $_POST["graph_height"]);
}
+ } else {
-+ api_plugin_hook_function('graphs_action_execute', $_POST['drp_action']);
++ api_plugin_hook_function('graphs_action_execute', $_POST['drp_action']);
}
header("Location: graphs.php");
-@@ -502,6 +506,11 @@
- </td>
- </tr>\n
- ";
-+ } else {
-+ $save['drp_action'] = $_POST['drp_action'];
-+ $save['graph_list'] = $graph_list;
-+ $save['graph_array'] = (isset($graph_array) ? $graph_array : array());
-+ api_plugin_hook_function('graphs_action_prepare', $save);
- }
+@@ -514,6 +518,12 @@
+ ";
- if (!isset($graph_array)) {
-diff -Naur cacti-0.8.7e-old/host.php cacti-0.8.7e/host.php
---- cacti-0.8.7e-old/host.php 2009-06-28 11:07:11.000000000 -0500
-+++ cacti-0.8.7e/host.php 2009-11-21 23:06:16.000000000 -0600
+ $save_html = "<input type='button' value='Cancel' onClick='window.history.back()'> <input type='submit' value='Continue' title='Resize Selected Graph(s)'>";
++ } else {
++ $save['drp_action'] = $_POST['drp_action'];
++ $save['graph_list'] = $graph_list;
++ $save['graph_array'] = (isset($graph_array) ? $graph_array : array());
++ api_plugin_hook_function('graphs_action_prepare', $save);
++ $save_html = "<input type='button' value='Cancel' onClick='window.history.back()'> <input type='submit' value='Continue'>";
+ }
+ }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.7f-old/host.php cacti-0.8.7f/host.php
+--- cacti-0.8.7f-old/host.php 2010-05-20 14:02:08.000000000 -0500
++++ cacti-0.8.7f/host.php 2010-05-18 06:19:32.000000000 -0500
@@ -44,6 +44,8 @@
6 => "Change Availability Options"
);
@@ -219,7 +385,7 @@
/* set default action */
if (!isset($_REQUEST["action"])) { $_REQUEST["action"] = ""; }
-@@ -309,6 +311,8 @@
+@@ -305,6 +307,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);
}
@@ -228,89 +394,90 @@
}
header("Location: host.php");
-@@ -445,6 +449,11 @@
- </tr>\n
- <input type='hidden' name='tree_id' value='" . $matches[1] . "'>\n
- ";
-+ } else {
-+ $save['drp_action'] = $_POST['drp_action'];
-+ $save['host_list'] = $host_list;
-+ $save['host_array'] = (isset($host_array)? $host_array : array());
-+ api_plugin_hook_function('device_action_prepare', $save);
- }
-
- if (!isset($host_array)) {
-@@ -533,6 +542,8 @@
-
- display_output_messages();
+@@ -450,6 +454,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'>";
++ } else {
++ $save['drp_action'] = $_POST['drp_action'];
++ $save['host_list'] = $host_list;
++ $save['host_array'] = (isset($host_array)? $host_array : array());
++ api_plugin_hook_function('device_action_prepare', $save);
++ $save_html = "<input type='button' value='Cancel' onClick='window.history.back()'> <input type='submit'>";
+ }
+ }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 @@
+ input_validate_input_number(get_request_var("id"));
+ /* ==================================================== */
+ api_plugin_hook('host_edit_top');
+
if (!empty($_GET["id"])) {
$host = db_fetch_row("select * from host where id=" . $_GET["id"]);
$header_label = "[edit: " . $host["description"] . "]";
-@@ -643,7 +654,8 @@
- <td class="textInfo" valign="top">
- <span style="color: #c16921;">*</span><a href="graphs_new.php?host_id=<?php print $host["id"];?>">Create Graphs for this Host</a><br>
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/cacti/cacti.spec?r1=1.123&r2=1.124&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/cacti/cacti-PA.patch?r1=1.1&r2=1.2&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/cacti/cacti-log-verbosity.patch?r1=1.2&r2=1.3&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/cacti/host_name-url.patch?r1=1.2&r2=1.3&f=u
More information about the pld-cvs-commit
mailing list