Skip to content

Commit

Permalink
Fixed two files (#5077)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddb4github authored Dec 12, 2022
1 parent 651f332 commit d3675f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -3306,7 +3306,7 @@ function checkForRedirects(data, href) {
document.location = urlPath + 'logout.php?action=disabled';
} else if (data.indexOf('cactiRedirect') >= 0) {
if (typeof href == 'undefined' || href == null) {
document.location = stripHeaderSuppression(document.location);
document.location = stripHeaderSuppression(document.location.href);
} else {
document.location = stripHeaderSuppression(href);
}
Expand Down Expand Up @@ -3953,7 +3953,7 @@ function initializeGraphs(disable_cache) {

var graph_height = $(this).attr('graph_height');
var graph_width = $(this).attr('graph_width');
var error_url = 'graph_view.php';
var error_url = urlPath + 'graph_view.php';

closeDateFilters();

Expand Down
8 changes: 4 additions & 4 deletions lib/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -6543,11 +6543,11 @@ function get_include_relpath($path) {
} elseif (file_exists($basePath . $path)) {
$npath = $path;
} elseif (debounce_run_notification('missing:' . $path)) {
$path = str_replace($basePath, '', $path);
$npath = str_replace($basePath, '', $path);

cacti_log(sprintf('WARNING: Key Cacti Include File %s missing. Please locate and replace this file', $config['base_path'] . '/' . $path), false, 'WEBUI');
cacti_log(sprintf('WARNING: Key Cacti Include File %s missing. Please locate and replace this file', $config['base_path'] . '/' . $npath), false, 'WEBUI');

admin_email(__('Cacti System Warning'), __('WARNING: Key Cacti Include File %s missing. Please locate and replace this file', $config['base_path'] . '/' . $path));
admin_email(__('Cacti System Warning'), __('WARNING: Key Cacti Include File %s missing. Please locate and replace this file', $config['base_path'] . '/' . $npath));
}

return $npath;
Expand Down Expand Up @@ -6576,7 +6576,7 @@ function get_md5_include_css($path) {
return '';
}

return '<link href=\''. $config['url_path'] . $npath . '?' . get_md5_hash($npath) . '\' type=\'text/css\' rel=\'stylesheet\'>' . PHP_EOL;
return '<link href=\''. $config['url_path'] . $relpath . '?' . get_md5_hash($relpath) . '\' type=\'text/css\' rel=\'stylesheet\'>' . PHP_EOL;
}

function is_resource_writable($path) {
Expand Down

0 comments on commit d3675f9

Please sign in to comment.