Skip to content

Commit

Permalink
Merge pull request #139 from steverobbins/feature/issue-138
Browse files Browse the repository at this point in the history
Fixes #138, filtering grid by status
  • Loading branch information
fbrnc committed Jul 15, 2015
2 parents 3d16b7c + b3c76b0 commit 99886d2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions app/code/community/Aoe/Scheduler/Model/Schedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -816,13 +816,18 @@ public function setCronExpr($expr)
*/
public function getStatuses()
{
$statuses = clone $this->getCollection()
$schedules = clone $this->getCollection()
->setOrder('status', Zend_Db_Select::SQL_ASC);
$statuses->getSelect()
$schedules->getSelect()
->group('status')
->reset(Zend_Db_Select::COLUMNS)
->columns('status');
return $statuses->getConnection()
->fetchCol($statuses->getSelect());
$statuses = $schedules->getConnection()
->fetchCol($schedules->getSelect());
$statusArray = array();
foreach ($statuses as $status) {
$statusArray[$status] = $status;
}
return $statusArray;
}
}

0 comments on commit 99886d2

Please sign in to comment.