clean up shows endpoint, remove dependency on Show model

This commit is contained in:
Mark Lewis 2014-11-20 18:16:52 +01:00 committed by Albert Santoni
parent a27ca2f583
commit 174cf79d84
3 changed files with 22 additions and 30 deletions

View file

@ -1394,13 +1394,12 @@ class ApiController extends Zend_Controller_Action
$results = array();
if (empty($showId)) {
$shows = Application_Model_Show::getDistinctShows();
foreach($shows as $baseShow) {
$show = new Application_Model_Show($baseShow->getDbId());
$shows = CcShowQuery::create()->find();
foreach($shows as $show) {
$results[] = $show->getShowInfo();
}
} else {
$show = new Application_Model_Show($showId);
$show = CcShowQuery::create()->findPK($showId);
$results[] = $show->getShowInfo();
}