Skip to content
Snippets Groups Projects
Commit 145683b6 authored by Chris Hallberg's avatar Chris Hallberg Committed by Robert Lange
Browse files

Fix channels bug when VuFind configured at site root. (#1541)

- Resolves VUFIND-1377.
parent fb2b2a32
No related merge requests found
......@@ -163,10 +163,10 @@ function getUrlRoot(url) {
var urlroot = null;
var urlParts = url.split(/[?#]/);
var urlWithoutFragment = urlParts[0];
if (VuFind.path === '') {
if (VuFind.path === '' || VuFind.path === '/') {
// special case -- VuFind installed at site root:
var chunks = urlWithoutFragment.split('/');
urlroot = '/' + chunks[3] + '/' + chunks[4];
urlroot = '/' + chunks[1] + '/' + chunks[2];
} else {
// standard case -- VuFind has its own path under site:
var slashSlash = urlWithoutFragment.indexOf('//');
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment