aboutsummaryrefslogtreecommitdiffstats
path: root/www/fswiki/files/patch-Wiki.pm
blob: 0b1d23833d28942ba499989faed61b33fc8080e2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- lib/Wiki.pm.orig    Sun Aug 22 13:49:50 2004
+++ lib/Wiki.pm Mon Nov  8 12:56:01 2004
@@ -41,7 +41,7 @@
    # ÀßÄê¤òÆɤ߹þ¤ß
    my $setupfile = shift || 'setup.dat';
    $self->{"config"} = &Util::load_config_hash(undef,$setupfile);
-   die "setup file ${setupfile} not found" if scalar(%{$self->{"config"}}) == 0;
+   die "setup file ${setupfile} not found" if (keys %{$self->{"config"}} == 0);
    $self->{"config"}->{"plugin_dir"} = "."         unless exists($self->{"config"}->{"plugin_dir"});
    $self->{"config"}->{"frontpage"}  = "FrontPage" unless exists($self->{"config"}->{"frontpage"});
    unshift(@INC, $self->{"config"}->{"plugin_dir"});
@@ -1444,7 +1444,7 @@
 sub farm_is_enable {
    my $self = shift;
    my $farm_config = &Util::load_config_hash($self,$self->config('farmconf_file'));
-   if($farm_config->{usefarm}==1){
+   if(defined $farm_config->{usefarm} and $farm_config->{usefarm}==1){
        return 1;
    } else {
        return 0;