Skip to content

Commit

Permalink
Item14300: fix testing for SolrPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Jan 23, 2017
1 parent 9a6aeda commit 47953d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/Foswiki/Plugins/LikePlugin.pm
Expand Up @@ -22,7 +22,7 @@ use Foswiki::Func ();
use Foswiki::Plugins::JQueryPlugin ();
use Foswiki::Contrib::JsonRpcContrib ();

our $VERSION = '2.00';
our $VERSION = '2.01';
our $RELEASE = '02 Sep 2016';
our $SHORTDESCRIPTION = 'Like-style voting for content';
our $NO_PREFS_IN_TOPIC = 1;
Expand All @@ -37,7 +37,7 @@ sub initPlugin {
return getCore()->jsonRpcVote(@_);
});

if ($Foswiki::cfg{Plugins}{SolrPlugin}{Enabled}) {
if ($Foswiki::cfg{Plugins}{SolrPlugin} && $Foswiki::cfg{Plugins}{SolrPlugin}{Enabled}) {
require Foswiki::Plugins::SolrPlugin;
Foswiki::Plugins::SolrPlugin::registerIndexTopicHandler(sub {
return getCore()->solrIndexTopicHandler(@_);
Expand Down
2 changes: 1 addition & 1 deletion lib/Foswiki/Plugins/LikePlugin/Core.pm
Expand Up @@ -419,7 +419,7 @@ sub jsonRpcVote {
} else {

# trigger solr indexer ourselves
if ($Foswiki::cfg{Plugins}{SolrPlugin}{Enabled}) {
if ($Foswiki::cfg{Plugins}{SolrPlugin} && $Foswiki::cfg{Plugins}{SolrPlugin}{Enabled}) {
require Foswiki::Plugins::SolrPlugin;
my $indexer = Foswiki::Plugins::SolrPlugin::getIndexer();
$indexer->indexTopic($web, $topic);
Expand Down

0 comments on commit 47953d9

Please sign in to comment.