Navigation Menu

Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Commit

Permalink
Fix virtroot path issue in getinfo.cgi
Browse files Browse the repository at this point in the history
  • Loading branch information
David Humphrey (:humph) committed Aug 16, 2010
1 parent a072ce4 commit f8f551d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/dxr.js
Expand Up @@ -11,6 +11,7 @@ var infoDiv,
currentLine,
signature,
maincontent,
sep = '',
signatureVisible = false;

function closeInfo() {
Expand All @@ -29,7 +30,7 @@ function showInfo(node) {
var name = node.innerHTML;
var line = node.parentNode.id.replace('l', '');
var file = location.pathname.replace(virtroot + '/' + tree + '/', '').replace('.html', '');
var url = "/dxr/getinfo.cgi?virtroot=" + virtroot + "&tree=" + tree + "&div=" + infoDivID++
var url = virtroot + sep + "getinfo.cgi?virtroot=" + virtroot + "&tree=" + tree + "&div=" + infoDivID++
if (type == 's' || type == 's-fuzzy') { // statements have matching line number
url += "&type=" + type + "&name=" + name + "&file=" +
file + "&line=" + node.getAttribute("line").replace('l','');
Expand Down Expand Up @@ -90,6 +91,9 @@ function init() {
dojo.addClass(l, 'highlighted');
}
}

// Figure out the right path separator to use with virtroot
sep = virtroot[virtroot.length - 1] === '/' ? '' : '/';
}

// Given a line number, try to find the ID for the containing function in the sidebar.
Expand Down

0 comments on commit f8f551d

Please sign in to comment.