From 75bcfe747b31c4d85556fefba19fe7c0ef90abcd Mon Sep 17 00:00:00 2001 From: cigamit Date: Sun, 22 Jan 2017 03:42:43 -0600 Subject: [PATCH] Correct spelling of watermark variable --- include/global_settings.php | 4 ++-- install/0_8_8h_to_1_0_0.php | 4 ++++ lib/rrd.php | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/global_settings.php b/include/global_settings.php index 9ee8bb156..2dc3853fd 100644 --- a/include/global_settings.php +++ b/include/global_settings.php @@ -664,12 +664,12 @@ $settings = array( 'default' => 60, 'array' => $page_refresh_interval, ), - 'wathermark_header' => array( + 'watermark_header' => array( 'friendly_name' => __('RRDtool Graph Watermark'), 'collapsible' => 'true', 'method' => 'spacer' ), - 'graph_wathermark' => array( + 'graph_watermark' => array( 'friendly_name' => __('Watermark Text'), 'description' => __('Test to place at the bottom center of every Graph.'), 'method' => 'textbox', diff --git a/install/0_8_8h_to_1_0_0.php b/install/0_8_8h_to_1_0_0.php index 30e89b761..43c81d65e 100644 --- a/install/0_8_8h_to_1_0_0.php +++ b/install/0_8_8h_to_1_0_0.php @@ -1725,5 +1725,9 @@ function upgrade_to_1_0_0() { db_install_execute("UPDATE graph_templates_graph SET unit_value='' WHERE unit_value='on'"); db_install_add_key('data_local', 'INDEX', 'snmp_index', array('snmp_index(191)')); + + if (db_fetch_cell('SELECT name FROM settings WHERE name = "graph_wathermark"', 'name') == 'graph_wathermark') { + db_install_execute('UPDATE settings SET name = "graph_watermark" WHERE name = "graph_wathermark"'); + } } diff --git a/lib/rrd.php b/lib/rrd.php index 40d26b0be..f7f88a6d4 100644 --- a/lib/rrd.php +++ b/lib/rrd.php @@ -1100,8 +1100,8 @@ function rrd_function_process_graph_options($graph_start, $graph_end, &$graph, & } /* if the user desires a wartermark set it */ - if (read_config_option('graph_wathermark') != '') { - $graph_opts .= '--watermark ' . cacti_escapeshellarg(read_config_option('graph_wathermark')) . RRD_NL; + if (read_config_option('graph_watermark') != '') { + $graph_opts .= '--watermark ' . cacti_escapeshellarg(read_config_option('graph_watermark')) . RRD_NL; } return $graph_opts;