From 5e3304d59a5b87efbc7aeebd53fcd3cebbe01f2c Mon Sep 17 00:00:00 2001 From: Jamie McCarthy Date: Tue, 12 Jun 2007 20:58:26 +0000 Subject: [PATCH] Only instantiate objects whose plugins have been installed --- plugins/Stats/adminmail.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/Stats/adminmail.pl b/plugins/Stats/adminmail.pl index fb691598b..f9b45e04a 100644 --- a/plugins/Stats/adminmail.pl +++ b/plugins/Stats/adminmail.pl @@ -843,12 +843,12 @@ } $statsSave->createStatDaily("relocate_all", $total); } - - my $subscribe = getObject('Slash::Subscribe'); - my $firehose = getObject('Slash::FireHose'); - my $tags = getObject('Slash::Tags'); - - if($subscribe){ + + my $subscribe = getObject('Slash::Subscribe') if $constants->{plugin}{Subscribe}; + my $firehose = getObject('Slash::FireHose') if $constants->{plugin}{FireHose}; + my $tags = getObject('Slash::Tags') if $constants->{plugin}{Tags}; + + if ($subscribe) { my $rswh = $stats->getSubscribersWithRecentHits(); my $sub_cr = $logdb->getSubscriberCrawlers($rswh); my $sub_report;