mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-12 19:17:45 +02:00
fix(map): update episode markers query to discard unpublished episodes
This commit is contained in:
parent
797e532727
commit
b3caac45b1
1 changed files with 3 additions and 2 deletions
|
|
@ -10,7 +10,6 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Controllers;
|
namespace App\Controllers;
|
||||||
|
|
||||||
use App\Entities\Page;
|
|
||||||
use App\Models\EpisodeModel;
|
use App\Models\EpisodeModel;
|
||||||
use CodeIgniter\HTTP\ResponseInterface;
|
use CodeIgniter\HTTP\ResponseInterface;
|
||||||
|
|
||||||
|
|
@ -34,7 +33,9 @@ class MapMarkerController extends BaseController
|
||||||
{
|
{
|
||||||
$cacheName = 'episodes_markers';
|
$cacheName = 'episodes_markers';
|
||||||
if (! ($found = cache($cacheName))) {
|
if (! ($found = cache($cacheName))) {
|
||||||
$episodes = (new EpisodeModel())->where('location_geo is not', null)
|
$episodes = (new EpisodeModel())
|
||||||
|
->where('`published_at` <= NOW()', null, false)
|
||||||
|
->where('location_geo is not', null)
|
||||||
->findAll();
|
->findAll();
|
||||||
$found = [];
|
$found = [];
|
||||||
foreach ($episodes as $episode) {
|
foreach ($episodes as $episode) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue