web installer: clean up warns; improve naming of Nozebra op
authorGalen Charlton <galen.charlton@liblime.com>
Wed, 26 Dec 2007 23:07:11 +0000 (17:07 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Thu, 27 Dec 2007 02:48:04 +0000 (20:48 -0600)
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>
installer/install.pl
koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tmpl

index 640dac0..f13f1e1 100755 (executable)
@@ -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;
         }
index d9804bf..d3ed6ea 100644 (file)
     <!--/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>
     <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">