From c3f2a393eff1b5eb33d06ef0552384fb085f1fc9 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 5 Feb 2010 11:38:14 +0100 Subject: [PATCH] Updated gitweb links to match new version of git --- content/quickbox.js | 10 +++++----- content/tv2developer.js | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/content/quickbox.js b/content/quickbox.js index 34a53f0..c9ff1f5 100644 --- a/content/quickbox.js +++ b/content/quickbox.js @@ -453,7 +453,7 @@ var TV2DeveloperQuickBox = { entered_url = this._makeUrl(protocol, env, sitetype, php4, username, site, uri, false); } var git_sitename = (!site) ? 'www' : site.replace(/-(static|dyn)/, ''); - url = 'http://flimmer.tv2.dk/git/'; + url = 'http://flimmer.tv2.dk/git/?p='; var git_root = '/' + sitetype; var magicChangeView = (!manual); var magicChangeViewTo = (uriOnly ? 'content' : 'summary'); @@ -545,15 +545,15 @@ var TV2DeveloperQuickBox = { } if (uriOnly.length > 1) { - url += '?f=' + uriOnly.substr(1); + url += ';f=' + uriOnly.substr(1); if (!git_viewcontent) { url += ';a=history'; } } else if (git_viewcontent) { // project tree - url += '?a=tree'; + url += ';a=tree'; } - url += (url.indexOf('?')!=-1?';':'?') + 'hb=' + (php4branch ? 'php4' : 'HEAD'); + url += ';hb=' + (php4branch ? 'php4' : 'HEAD'); break; case 'go-pdolog': uri = '/tool/pdo_log/frameset.php?url='+action_on_url_encoded+'&autostop=1&prefix='+current_user; @@ -587,7 +587,7 @@ var TV2DeveloperQuickBox = { }, /* method to extract short url */ - _reg_fromgitweb: /^https?:\/\/flimmer\.tv2\.dk\/git\/([^/]+)(?:\.tv2\.dk)?\.git.*?/, + _reg_fromgitweb: /^https?:\/\/flimmer\.tv2\.dk\/git\/(?:\?p=)([^/]+?)(?:\.tv2\.dk)?\.git.*?/, _reg_viewgitfile: /[?;&]f=(?:(webroot|robot|opdatering|template|([^;/&]+)))([^;&#]*)[&;#]?/, _reg_viewgitbranch1: /[?;&]hb=php4[&;#]?/, _reg_viewgitbranch2: /[?;&]h=refs\/heads\/php4[&;#]?/, diff --git a/content/tv2developer.js b/content/tv2developer.js index b70f933..1661b1d 100644 --- a/content/tv2developer.js +++ b/content/tv2developer.js @@ -204,7 +204,7 @@ var TV2Developer = { _reg_php: /^(.*\.php)/, _reg_nodeid: /([0-9]{2,})/g, _reg_i2files: /\/([0-9]+)-/, - _reg_fromgitweb: /^https?:\/\/flimmer\.tv2\.dk\/git\/([^/]+)\.tv2\.dk\.git.*(?:f=(webroot|robot|opdatering|template)([^;&]*))/, + _reg_fromgitweb: /^https?:\/\/flimmer\.tv2\.dk\/git\/\?p=([^/]+)\.tv2\.dk\.git.*(?:f=(webroot|robot|opdatering|template)([^;&]*))/, _reg_fromi2if: /^\/(tango\/(entry|requeue|dynamic)|tool\/pdo_log\/frameset)\.php.*?(\?|&)url=([^&]+)/, _reg_cutdomain: /^(.*)\.tv2\.dk$/, getLinks: function() { @@ -337,8 +337,8 @@ var TV2Developer = { links.push(new this.TV2LinkSplit()); // Add the GitWeb link, inspired by ViewCVS link, inspired by Adrian Bak (ADBA) - var gitweb = 'http://flimmer.tv2.dk/git/' - + git_sitename + '.tv2.dk.git?hb=HEAD;f=' + (tv2_sitetype?tv2_sitetype:'webroot'); + var gitweb = 'http://flimmer.tv2.dk/git/?p=' + + git_sitename + '.tv2.dk.git;hb=HEAD;f=' + (tv2_sitetype?tv2_sitetype:'webroot'); var php = this._reg_php.exec(tv2_uriOnly); if (php) { gitweb += php[1]; -- 2.52.0