summaryrefslogtreecommitdiffstats
path: root/khelpcenter/searchhandlers
diff options
context:
space:
mode:
Diffstat (limited to 'khelpcenter/searchhandlers')
-rwxr-xr-xkhelpcenter/searchhandlers/khc_docbookdig.pl.in16
-rwxr-xr-xkhelpcenter/searchhandlers/khc_htdig.pl.in2
-rwxr-xr-xkhelpcenter/searchhandlers/khc_htsearch.pl4
3 files changed, 12 insertions, 10 deletions
diff --git a/khelpcenter/searchhandlers/khc_docbookdig.pl.in b/khelpcenter/searchhandlers/khc_docbookdig.pl.in
index 63f787515..e49df688d 100755
--- a/khelpcenter/searchhandlers/khc_docbookdig.pl.in
+++ b/khelpcenter/searchhandlers/khc_docbookdig.pl.in
@@ -26,10 +26,12 @@ use strict;
use Getopt::Long;
-my $htdigdata = "/srv/www/htdig/common/";
+my $htdigdata = "/etc/htdig";
my $htdigbin = "/usr/bin";
my $kdeprefix = "@prefix@";
+my $kdehtmldir = `kde-config --expandvars --install html`;
chomp $kdeprefix;
+chomp $kdehtmldir;
my $dbg = 1;
@@ -89,7 +91,7 @@ $ENV{ PATH } = '/bin:/usr/bin';
$ENV{ CDPATH } = '';
$ENV{ ENV } = '';
-my $findpath = "$kdeprefix/share/doc/HTML/$lang/";
+my $findpath = "$kdehtmldir/$lang/";
my $findcmd = "find $findpath -name index.docbook";
print STDERR "FINDCMD: $findcmd\n";
@@ -132,15 +134,15 @@ mime=\$1
shift
if test "\$#" -gt 0; then
- orig=\${1/file:\\//}
+ orig=\${1#file:/}
shift
fi
case "\$orig" in
help:/*)
- orig=\${orig/help:\\//}
- orig=\${orig/\/index.docbook/}
- cd $kdeprefix/share/doc/HTML/en/\$orig
+ orig=\${orig#help:/}
+ orig=\${orig%\/index.docbook}
+ cd $kdehtmldir/en/\$orig
file=index.docbook
;;
*)
@@ -167,7 +169,7 @@ common_dir: $commondir
locale: $locale
database_dir: $htdigdb
database_base: \${database_dir}/$identifier
-local_urls: help://=$kdeprefix/share/doc/HTML/en/ file://=/
+local_urls: help://=$kdehtmldir/en/ file://=/
local_urls_only: true
limit_urls_to: file:// help:/
ignore_noindex: true
diff --git a/khelpcenter/searchhandlers/khc_htdig.pl.in b/khelpcenter/searchhandlers/khc_htdig.pl.in
index 909d53fd1..a9eb25de6 100755
--- a/khelpcenter/searchhandlers/khc_htdig.pl.in
+++ b/khelpcenter/searchhandlers/khc_htdig.pl.in
@@ -26,7 +26,7 @@ use strict;
use Getopt::Long;
-my $htdigdata = "/srv/www/htdig/common/";
+my $htdigdata = "/etc/htdig";
my $htdigbin = "/usr/bin";
my $kdeprefix = "@prefix@";
chomp $kdeprefix;
diff --git a/khelpcenter/searchhandlers/khc_htsearch.pl b/khelpcenter/searchhandlers/khc_htsearch.pl
index 451e858dd..b7ea694b3 100755
--- a/khelpcenter/searchhandlers/khc_htsearch.pl
+++ b/khelpcenter/searchhandlers/khc_htsearch.pl
@@ -8,7 +8,7 @@ use Getopt::Long;
use open IO => ':utf8';
use open ':std';
-my $htsearchpath="/srv/www/cgi-bin/htsearch";
+my $htsearchpath="/usr/lib/cgi-bin/htsearch";
my $config;
my $format;
@@ -42,7 +42,7 @@ my $charset = langCharset( $lang );
$words = encode( $charset, $words );
if ( !open( HTSEARCH, "-|", "$htsearchpath", "-c", "$indexdir/$config.conf",
- "format=$format&method=$method&words=$words" ) )
+ "format=$format&method=$method&words=$words&matchesperpage=$maxnum&exclude=[index.html]" ) )
{
print "Can't execute htsearch at '$htsearchpath'.\n";
exit 1;