From 0e44acbb2fec928a1606dc60f427a148fff405c9 Mon Sep 17 00:00:00 2001
From: Mohamed Ragab <moragab@gmail.com>
Date: Wed, 02 May 2012 11:15:01 -0400
Subject: [PATCH] Added a script to facilitate setting the proxy host and port and no proxy hosts, and then it concatenates all the java system properties for setting the java proxy configurations and puts the resulting string in an environment variable JAVA_PROXY_CONFIG, modified the scirpts gitblit, gitblit-ubuntu, and gitblit-centos to source the java-proxy-config.sh script and then include the resulting java proxy configuration in the java command
---
src/com/gitblit/wicket/pages/RepositoryPage.java | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/com/gitblit/wicket/pages/RepositoryPage.java b/src/com/gitblit/wicket/pages/RepositoryPage.java
index cd3c8a2..3f57fbf 100644
--- a/src/com/gitblit/wicket/pages/RepositoryPage.java
+++ b/src/com/gitblit/wicket/pages/RepositoryPage.java
@@ -27,7 +27,6 @@
import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.DropDownChoice;
-import org.apache.wicket.markup.html.form.StatelessForm;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.link.ExternalLink;
import org.apache.wicket.markup.html.panel.Fragment;
@@ -51,6 +50,7 @@
import com.gitblit.wicket.GitBlitWebSession;
import com.gitblit.wicket.PageRegistration;
import com.gitblit.wicket.PageRegistration.OtherPageLink;
+import com.gitblit.wicket.SessionlessForm;
import com.gitblit.wicket.WicketUtils;
import com.gitblit.wicket.panels.LinkPanel;
import com.gitblit.wicket.panels.NavigationPanel;
@@ -73,7 +73,7 @@
objectId = WicketUtils.getObject(params);
if (StringUtils.isEmpty(repositoryName)) {
- error(MessageFormat.format("Repository not specified for {0}!", getPageName()), true);
+ error(MessageFormat.format(getString("gb.repositoryNotSpecifiedFor"), getPageName()), true);
}
if (!getRepositoryModel().hasCommits) {
@@ -177,7 +177,7 @@
if (r == null) {
Repository r = GitBlit.self().getRepository(repositoryName);
if (r == null) {
- error("Can not load repository " + repositoryName, true);
+ error(getString("gb.canNotLoadRepository") + " " + repositoryName, true);
return null;
}
this.r = r;
@@ -190,7 +190,7 @@
RepositoryModel model = GitBlit.self().getRepositoryModel(
GitBlitWebSession.get().getUser(), repositoryName);
if (model == null) {
- authenticationError("Unauthorized access for repository " + repositoryName);
+ authenticationError(getString("gb.unauthorizedAccessForRepository") + " " + repositoryName);
return null;
}
m = model;
@@ -201,7 +201,7 @@
protected RevCommit getCommit() {
RevCommit commit = JGitUtils.getCommit(r, objectId);
if (commit == null) {
- error(MessageFormat.format("Failed to find commit \"{0}\" in {1} for {2} page!",
+ error(MessageFormat.format(getString("gb.failedToFindCommit"),
objectId, repositoryName, getPageName()), true);
}
return commit;
@@ -314,7 +314,7 @@
return WicketUtils.newObjectParameter(repositoryName, commitId);
}
- private static class SearchForm extends StatelessForm<Void> implements Serializable {
+ private class SearchForm extends SessionlessForm<Void> implements Serializable {
private static final long serialVersionUID = 1L;
private final String repositoryName;
@@ -325,7 +325,7 @@
Constants.SearchType.COMMIT);
public SearchForm(String id, String repositoryName) {
- super(id);
+ super(id, RepositoryPage.this.getClass(), RepositoryPage.this.getPageParameters());
this.repositoryName = repositoryName;
DropDownChoice<Constants.SearchType> searchType = new DropDownChoice<Constants.SearchType>(
"searchType", Arrays.asList(Constants.SearchType.values()));
@@ -347,7 +347,6 @@
Constants.SearchType searchType = searchTypeModel.getObject();
String searchString = searchBoxModel.getObject();
if (searchString == null) {
- // FIXME IE intermittently has no searchString. Wicket bug?
return;
}
for (Constants.SearchType type : Constants.SearchType.values()) {
@@ -360,7 +359,8 @@
}
Class<? extends BasePage> searchPageClass = GitSearchPage.class;
RepositoryModel model = GitBlit.self().getRepositoryModel(repositoryName);
- if (!ArrayUtils.isEmpty(model.indexedBranches)) {
+ if (GitBlit.getBoolean(Keys.web.allowLuceneIndexing, true)
+ && !ArrayUtils.isEmpty(model.indexedBranches)) {
// this repository is Lucene-indexed
searchPageClass = LuceneSearchPage.class;
}
--
Gitblit v1.9.1