Fixed a bug where the adminbar would not show up if adminModeSubnets is missing in the config file.

This commit is contained in:
Martin Kamerbeek 2006-11-10 14:39:32 +00:00
parent d6352048c1
commit ce447fdbd9

View file

@ -129,7 +129,7 @@ Returns a boolean indicating whether the user has the basic privileges needed to
sub canUseAdminMode {
my $self = shift;
my $pass = 1;
my $subnets = $self->session->config->get("adminModeSubnets");
my $subnets = $self->session->config->get("adminModeSubnets") || [];
if (scalar(@$subnets)) {
$pass = isInSubnet($self->session->env->get("REMOTE_ADDR"), $subnets);
}