web installer: clean up warns; improve naming of Nozebra op

The former 'Nozebra' op has been renamed to 'SetIndexingEngine'
to avoid having a 'Nozebra' op and a 'NoZebra' parameter
distinguished only by case.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Galen Charlton 2007-12-26 17:07:11 -06:00 committed by Joshua Ferraro
parent da8a4ca991
commit bedab2e973
2 changed files with 7 additions and 8 deletions

View file

@ -280,14 +280,11 @@ elsif ( $step && $step == 3 ) {
# The installer will have to relogin since we do not pass cookie to redirection.
$template->param( "$op" => 1 );
}
elsif ( $op && $op eq 'Nozebra' ) {
warn "OP : $op";
elsif ( $op && $op eq 'SetIndexingEngine' ) {
if ($query->param('NoZebra')) {
warn "HERE";
$dbh->do("UPDATE systempreferences SET value=1 WHERE variable='NoZebra'");
$dbh->do("UPDATE systempreferences SET value=0 WHERE variable in ('QueryFuzzy','QueryWeightFields','QueryStemming')");
} else {
warn "WRONG";
$dbh->do("UPDATE systempreferences SET value=0 WHERE variable='NoZebra'");
}
$template->param( "$op" => 1 );
@ -313,6 +310,7 @@ elsif ( $step && $step == 3 ) {
);
$request->execute;
my ($systempreference) = $request->fetchrow;
$systempreference = '' unless defined $systempreference; # avoid warning
foreach my $file (@fnames) {
# warn $file;
@ -430,6 +428,7 @@ elsif ( $step && $step == 3 ) {
);
$request->execute;
my ($frameworksloaded) = $request->fetchrow;
$frameworksloaded = '' unless defined $frameworksloaded; # avoid warning
my %frameworksloaded;
foreach ( split( /\|/, $frameworksloaded ) ) {
$frameworksloaded{$_} = 1;
@ -554,7 +553,7 @@ elsif ( $step && $step == 3 ) {
my %cell=(
"label"=> ucfirst($marc),
"code"=>uc($marc),
"checked"=>uc($marc) eq $marcflavour);
"checked"=> defined($marcflavour) ? uc($marc) eq $marcflavour : 0);
# $cell{"description"}= do { local $/ = undef; open INPUT "<$dir/$marc.txt"||"";<INPUT> };
push @flavourlist, \%cell;
}

View file

@ -172,7 +172,7 @@
<!--/TMPL_LOOP-->
</ul>
<!--/TMPL_LOOP-->
<h2>Zebra or Nozebra ?</h2>
<h2>Choose indexing engine</h2>
<p>Searching Koha's bibliographic and authorities databases can be acomplished in two ways:
Koha can utilize a textual index engine (Zebra) or use its own internal indexing scheme (NoZebra).
</p>
@ -199,14 +199,14 @@
<h3>Please Choose:</h3>
<form action="install.pl">
<input type="hidden" name="step" value="3" />
<input type="hidden" name="op" value="Nozebra" />
<input type="hidden" name="op" value="SetIndexingEngine" />
<p><input type="radio" name="NoZebra" value="1" />Nozebra: my catalogue is not that large and I want something simple to setup/maintain</p>
<p><input type="radio" name="NoZebra" value="0" />Zebra: I have a large catalogue, I understand I must configure Zebra after the installation has completed</p>
<input type="submit" value="Choose" /></form>
</form>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="Nozebra" -->
<!-- TMPL_IF name="SetIndexingEngine" -->
<p>Installation complete.<br />
<p>Click on Finish to complete and load the Koha Staff Interface.
<form name="finish">