Skip to content

Commit

Permalink
Fix undefined variable instance error in retweet spike insight
Browse files Browse the repository at this point in the history
  • Loading branch information
ginatrapani committed Aug 10, 2012
1 parent 9ffe6ae commit f59a8bc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions webapp/plugins/insightsgenerator/insights/retweetspike.php
Expand Up @@ -33,7 +33,7 @@ class RetweetSpikeInsight extends InsightPluginParent implements InsightPlugin {

public function generateInsight(Instance $instance, $last_week_of_posts, $number_days) {
parent::generateInsight($instance, $last_week_of_posts, $number_days);
self::generateInsightBaselines($number_days);
self::generateInsightBaselines($instance, $number_days);
$this->logger->logInfo("Begin generating insight", __METHOD__.','.__LINE__);

$insight_baseline_dao = DAOFactory::getDAO('InsightBaselineDAO');
Expand Down Expand Up @@ -139,10 +139,11 @@ public function generateInsight(Instance $instance, $last_week_of_posts, $number
}
/**
* Calculate and store insight baselines for a specified number of days.
* @param Instance $instance
* @param int $number_days Number of days to backfill
* @return void
*/
private function generateInsightBaselines($number_days=3) {
private function generateInsightBaselines($instance, $number_days=3) {
$post_dao = DAOFactory::getDAO('PostDAO');
$insight_baseline_dao = DAOFactory::getDAO('InsightBaselineDAO');

Expand Down

0 comments on commit f59a8bc

Please sign in to comment.