From: Robert Fitzsimons <robfitz@273k.net>
To: git@vger.kernel.org
Cc: Robert Fitzsimons <robfitz@273k.net>
Subject: [PATCH 3/3] gitweb: Allow search to be disabled from the config file.
Date: Sat, 23 Dec 2006 03:35:16 +0000 [thread overview]
Message-ID: <11668449274162-git-send-email-robfitz@273k.net> (raw)
In-Reply-To: <11668449271631-git-send-email-robfitz@273k.net>
Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
---
gitweb/gitweb.perl | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 6778b24..e8f63aa 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -128,6 +128,12 @@ our %feature = (
# => [content-encoding, suffix, program]
'default' => ['x-gzip', 'gz', 'gzip']},
+ # Enable text search, which will list the commits which match author,
+ # committer or commit text to a given string. Enabled by default.
+ 'search' => {
+ 'override' => 0,
+ 'default' => [1]},
+
# Enable the pickaxe search, which will list the commits that modified
# a given string in a file. This can be practical and quite faster
# alternative to 'blame', but still potentially CPU-intensive.
@@ -1729,6 +1735,9 @@ EOF
print " / $action";
}
print "\n";
+ }
+ my ($have_search) = gitweb_check_feature('search');
+ if ((defined $project) && ($have_search)) {
if (!defined $searchtext) {
$searchtext = "";
}
@@ -4147,6 +4156,10 @@ sub git_history {
}
sub git_search {
+ my ($have_search) = gitweb_check_feature('search');
+ if (!$have_search) {
+ die_error('403 Permission denied', "Permission denied");
+ }
if (!defined $searchtext) {
die_error(undef, "Text field empty");
}
--
1.4.4.3.gae7ae3
next prev parent reply other threads:[~2006-12-23 3:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-23 3:35 [PATCH 1/3] gitweb: Use rev-list pattern search options Robert Fitzsimons
2006-12-23 3:35 ` [PATCH 2/3] gitweb: Require a minimum of two character for the search text Robert Fitzsimons
2006-12-23 3:35 ` Robert Fitzsimons [this message]
2006-12-23 8:20 ` [PATCH 3/3] gitweb: Allow search to be disabled from the config file Jakub Narebski
2006-12-23 12:28 ` Robert Fitzsimons
2006-12-23 13:00 ` Jakub Narebski
2006-12-23 14:57 ` [PATCH] gitweb: Paginate commit/author/committer search output Robert Fitzsimons
2006-12-23 22:43 ` Jakub Narebski
2006-12-23 3:46 ` [PATCH 1/3] gitweb: Use rev-list pattern search options Robert Fitzsimons
2006-12-23 8:21 ` Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11668449274162-git-send-email-robfitz@273k.net \
--to=robfitz@273k.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).