minor improvements
authorJoey Hess <joey@kodama.kitenet.net>
Mon, 7 Jul 2008 05:54:28 +0000 (01:54 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Mon, 7 Jul 2008 05:54:28 +0000 (01:54 -0400)
IkiWiki/Plugin/search.pm

index 7b41bbde9152da89dad16937a9e0bca3f122f933..284f477fae5b32f63f9c9159f06c4af84dea2acd 100644 (file)
@@ -194,9 +194,10 @@ sub xapiandb () { #{{{
        return $db;
 } #}}}
 
-my $setup;
+{
+my $setup=0;
 sub setupfiles () { #{{{
-       if (! defined $setup and ! -e $config{wikistatedir}."/xapian" || $config{rebuild}) {
+       if (! $setup and (! -e $config{wikistatedir}."/xapian" || $config{rebuild})) {
                writefile("omega.conf", $config{wikistatedir}."/xapian",
                        "database_dir .\n".
                        "template_dir ./templates\n");
@@ -206,5 +207,6 @@ sub setupfiles () { #{{{
                $setup=1;
        }
 } #}}}
+}
 
 1