Updated gitweb links to match new version of git
authorunknown <JKKN@.(none)>
Fri, 5 Feb 2010 10:38:14 +0000 (11:38 +0100)
committerunknown <JKKN@.(none)>
Fri, 5 Feb 2010 10:38:14 +0000 (11:38 +0100)
content/quickbox.js
content/tv2developer.js

index 34a53f0f7b0696473268a04ab33abbe56d1c5b90..c9ff1f5d7daa3cedcb1f8a64c4a2ce6cdc55a812 100644 (file)
@@ -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[&;#]?/,
index b70f9332b04855ed8a602fa3d424bcdcd9495a73..1661b1d521bd0e1011ce87ec29165fe2fbee6e5f 100644 (file)
@@ -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];