Statistieken worden weggeschreven voor nieuws, agenda, podcast en kerkdienst

This commit is contained in:
2017-09-05 00:24:44 +02:00
parent c61029e720
commit 5af44ce217

View File

@@ -10,7 +10,6 @@ ini_set('display_errors', true);
class PodcastController extends Controller
{
// TODO: Include program
public static $BASE_SQL = <<<QUERY
SELECT `podcast`.`id`, `podcast`.`soundfilename`,
`podcast_meta`.`creationdt` AS `created`, `podcast_meta`.`title`, `podcast_meta`.`content`, `podcast_meta`.`program`,
@@ -46,7 +45,15 @@ QUERY;
return abort(404);
}
return $this->getPodcastList($request, '`podcast_meta`.`program` = :program', ['program' => (int)$program]);
$filter = '`podcast_meta`.`program` = :program';
$params = ['program' => (int)$program];
if(($date = $request->get('date')) != null)
{
$filter .= ' AND DATE(`podcast_meta`.`creationdt`) = :date';
$params['date'] = $date;
}
return $this->getPodcastList($request, $filter, $params);
}
/**