Commit b3caac45 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

fix(map): update episode markers query to discard unpublished episodes

parent 797e5327
Pipeline #1063 passed with stages
in 10 minutes and 32 seconds
......@@ -10,7 +10,6 @@ declare(strict_types=1);
namespace App\Controllers;
use App\Entities\Page;
use App\Models\EpisodeModel;
use CodeIgniter\HTTP\ResponseInterface;
......@@ -34,7 +33,9 @@ class MapMarkerController extends BaseController
{
$cacheName = 'episodes_markers';
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();
$found = [];
foreach ($episodes as $episode) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment