Skip to content

Commit

Permalink
Item12592: Better warnings / errors
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@16888 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Oct 5, 2013
1 parent 5c70126 commit b086b8b
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions core/lib/Foswiki/Configure/Checkers/Cache/Implementation.pm
Expand Up @@ -11,19 +11,26 @@ use Foswiki::Configure::Dependency;

sub check {
my $this = shift;
my $e = '';
my $e = q{};

my $implementation = $Foswiki::cfg{Cache}{Implementation} || '';
my $implementation = $Foswiki::cfg{Cache}{Implementation} || q{};
my ($module) = $implementation =~ m/Foswiki::PageCache::(.*)/;

return unless ( $module && ( $module ne 'DBI::Generic' ) );
return if ( !$module || ( $module eq 'DBI::Generic' ) );

$module =~ s/^DBI::/DBD::/;

$e =
$this->checkPerlModule( $module, "Required to use $implementation.", 0 );

return ( ( $e =~ m/Not installed./ ) ? $this->ERROR($e) : $this->NOTE($e) );
if ( $Foswiki::cfg{Cache}{Enabled} ) {
return (
( $e =~ m/Not installed./ ) ? $this->ERROR($e) : $this->NOTE($e) );
}
else {
return (
( $e =~ m/Not installed./ ) ? $this->WARN($e) : $this->NOTE($e) );
}
}

1;
Expand Down

0 comments on commit b086b8b

Please sign in to comment.