Merge branch 'master' into add-podcast-import-date

This commit is contained in:
Robb 2019-05-04 11:53:28 -04:00 committed by GitHub
commit 842e459de5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 639 additions and 5 deletions

View file

@ -39,7 +39,7 @@ class Rest_PodcastController extends Zend_Rest_Controller
->filterByDbId($stationPodcastId, Criteria::NOT_EQUAL)
->leftJoinImportedPodcast()
->withColumn('auto_ingest_timestamp');
$total = $result->count();
if ($limit > 0) { $result->setLimit($limit); }
$result->setOffset($offset)
->orderBy($sortColumn, $sortDir);
@ -47,9 +47,10 @@ class Rest_PodcastController extends Zend_Rest_Controller
$podcastArray = $result->toArray(null, false, BasePeer::TYPE_FIELDNAME);
$this->getResponse()
->setHttpResponseCode(200)
->setHeader('X-TOTAL-COUNT', $result->count())
->setHeader('X-TOTAL-COUNT', $total)
->appendBody(json_encode($podcastArray));
}