Skip to content

Commit

Permalink
Fixes #138, filtering grid by status
Browse files Browse the repository at this point in the history
  • Loading branch information
steverobbins committed Jul 15, 2015
1 parent 3d16b7c commit b3c76b0
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 b3c76b0

Please sign in to comment.