Skip to content

Commit

Permalink
Further corrections for #2645
Browse files Browse the repository at this point in the history
Changes to description of base_url usage and to automatically add url_path.  Also, correct missing variable issue when generating a report.

Closes #2645
  • Loading branch information
netniV committed Apr 29, 2019
1 parent 9c21511 commit 5c24d34
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/global_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -1443,11 +1443,11 @@
),
'base_url' => array(
'friendly_name' => __('Server Base URL'),
'description' => __('This is a the server location that will be used for links to the Cacti site.'),
'description' => __('This is a the server location that will be used for links to the Cacti site. This should include the subdirectory if Cacti does not run from root folder.'),
'method' => 'textbox',
'max_length' => 255,
'size' => '60',
'default' => 'http://' . gethostname()
'default' => 'http://' . gethostname() . $config['url_path']
),
'settings_email_header' => array(
'friendly_name' => __('Emailing Options'),
Expand Down
2 changes: 1 addition & 1 deletion lib/html.php
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ function graph_drilldown_icons($local_graph_id, $type = 'graph_buttons') {

/* html_nav_bar - draws a navigation bar which includes previous/next links as well as current
page information
@arg $base_url - the base URL will all filter options except page#
@arg $base_url - the base URL will all filter options except page (should include url_path)
@arg $max_pages - the maximum number of pages to display
@arg $current_page - the current page in the navigation system
@arg $rows_per_page - the number of rows that are displayed on a single page
Expand Down
2 changes: 1 addition & 1 deletion lib/reports.php
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ function reports_graph_image($report, $item, $timespan, $output, $theme = 'class
set_config_option('base_url', $prefix . read_config_option('base_url'));
}

$out = "<a href='" . $prefix . html_escape(read_config_option('base_url', true) . '/graph.php?action=view&local_graph_id='.$item['local_graph_id']."&rra_id=0") . "'>" . $out . '</a>';
$out = "<a href='" . html_escape(read_config_option('base_url', true) . '/graph.php?action=view&local_graph_id='.$item['local_graph_id']."&rra_id=0") . "'>" . $out . '</a>';
}

return $out . PHP_EOL;
Expand Down

0 comments on commit 5c24d34

Please sign in to comment.