Remove negative actions from the best content filter module

master
Zachary Doll 2016-03-24 14:39:56 -05:00
parent edb987c8d0
commit e79acc5f18
1 changed files with 9 additions and 1 deletions

View File

@ -18,7 +18,15 @@ class BestFilterModule extends Gdn_Module {
parent::__construct($Sender);
$ActionModel = Yaga::ActionModel();
$this->Data = $ActionModel->Get();
$actions = $ActionModel->Get();
foreach($actions as $index => $action) {
if($action->AwardValue < 0) {
unset($actions[$index]);
}
}
$this->Data = $actions;
}
/**