diff --git a/app/code/community/Aoe/Scheduler/Model/Schedule.php b/app/code/community/Aoe/Scheduler/Model/Schedule.php index 787f02d..88adc02 100644 --- a/app/code/community/Aoe/Scheduler/Model/Schedule.php +++ b/app/code/community/Aoe/Scheduler/Model/Schedule.php @@ -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; } }