From: Kristian Kræmmer Nielsen Date: Mon, 7 Jan 2008 19:39:33 +0000 (+0100) Subject: Added / as default uri to handle index.php correctly X-Git-Url: https://git.jkkn.net/?a=commitdiff_plain;h=958f41ff0ee0e6af68c0466f96eeddc0f90fa555;p=tv2developer Added / as default uri to handle index.php correctly --- diff --git a/content/quickbox.js b/content/quickbox.js index 8b6b33c..e55fad4 100644 --- a/content/quickbox.js +++ b/content/quickbox.js @@ -384,22 +384,19 @@ var TV2DeveloperQuickBox = { } var cvs_view = (!cvs_viewsource ? 'log' : 'markup') url += cvs_root; // webroot, opdatering, robot,... - if (uriOnly) { - var php = /^(.*\.php)/.exec(uriOnly); - if (php) { - url += php[1] + '?view=' + cvs_view; - } else if(uriOnly.substr(-1) == '/') { - if (cvs_viewsource) { - url += uriOnly + 'index.php?view=' + cvs_view; - } else { - // we show the directory listing :-) - url += uriOnly; - } + if (!uriOnly) uriOnly = '/'; + var php = /^(.*\.php)/.exec(uriOnly); + if (php) { + url += php[1] + '?view=' + cvs_view; + } else if(uriOnly.substr(-1) == '/') { + if (cvs_viewsource) { + url += uriOnly + 'index.php?view=' + cvs_view; } else { - url += uriOnly + '?view=' + cvs_view; + // we show the directory listing :-) + url += uriOnly; } } else { - url += '/'; + url += uriOnly + '?view=' + cvs_view; } if (php5branch) { url += (url.indexOf('?')!=-1?'&':'?') + 'pathrev=PHP5';