Bläddra i källkod

Fix support for implied SSH urls in web.otherUrls (issue-311)

tags/v1.4.0
James Moger 10 år sedan
förälder
incheckning
2a8ea034b6
2 ändrade filer med 12 tillägg och 1 borttagningar
  1. 3
    0
      releases.moxie
  2. 9
    1
      src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java

+ 3
- 0
releases.moxie Visa fil

@@ -10,6 +10,7 @@ r20: {
text: ~
security: ~
fixes:
- Fixed support for implied SSH urls in web.otherUrls (issue-311)
- Fix potential NPE on removing uncached repository from cache
- Ignore the default contents of .git/description file
changes:
@@ -32,6 +33,8 @@ r20: {
- Klaus Nuber
- Florian Zschocke
- Bret Ikehara
- Chad Horohoe
- Domingo Oropeza
}

#

+ 9
- 1
src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java Visa fil

@@ -365,7 +365,15 @@ public class RepositoryUrlPanel extends BasePanel {
if (!urlPermissionsMap.containsKey(repoUrl.url)) {
String note;
if (repoUrl.isExternal()) {
String protocol = repoUrl.url.substring(0, repoUrl.url.indexOf("://"));
String protocol;
int protocolIndex = repoUrl.url.indexOf("://");
if (protocolIndex > -1) {
// explicit protocol specified
protocol = repoUrl.url.substring(0, protocolIndex);
} else {
// implicit SSH url
protocol = "ssh";
}
note = MessageFormat.format(getString("gb.externalPermissions"), protocol);
} else {
note = null;

Laddar…
Avbryt
Spara