From 958f41ff0ee0e6af68c0466f96eeddc0f90fa555 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20Kr=E6mmer=20Nielsen?= Date: Mon, 7 Jan 2008 20:39:33 +0100 Subject: [PATCH] Added / as default uri to handle index.php correctly --- content/quickbox.js | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) 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'; -- 2.52.0