diff options
author | James Moger <james.moger@gitblit.com> | 2014-06-27 14:37:40 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-06-27 14:37:40 -0400 |
commit | 0fd37157bc4a556407a54d466725fd33124993ba (patch) | |
tree | 225420959084783ac79c8f15c7645fbb1cd24e68 | |
parent | 7d75e2b646da990c9041f91fe41fdc892bbaf977 (diff) | |
parent | adfbad2d9821c50eda6141dc482e0605fd15d4e0 (diff) | |
download | gitblit-0fd37157bc4a556407a54d466725fd33124993ba.tar.gz gitblit-0fd37157bc4a556407a54d466725fd33124993ba.zip |
Merge branch 'ticket/113' into develop
-rw-r--r-- | src/main/java/com/gitblit/wicket/pages/BlobPage.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/BlobPage.java b/src/main/java/com/gitblit/wicket/pages/BlobPage.java index f3d0bc92..0938fcde 100644 --- a/src/main/java/com/gitblit/wicket/pages/BlobPage.java +++ b/src/main/java/com/gitblit/wicket/pages/BlobPage.java @@ -21,6 +21,7 @@ import java.util.Map; import org.apache.wicket.Component;
import org.apache.wicket.PageParameters;
+import org.apache.wicket.RedirectException;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.image.Image;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
@@ -52,6 +53,10 @@ public class BlobPage extends RepositoryPage { final String blobPath = WicketUtils.getPath(params);
String [] encodings = getEncodings();
+ if (StringUtils.isEmpty(objectId) && StringUtils.isEmpty(blobPath)) {
+ throw new RedirectException(TreePage.class, WicketUtils.newRepositoryParameter(repositoryName));
+ }
+
if (StringUtils.isEmpty(blobPath)) {
// blob by objectid
|