Loading app/Controllers/EpisodeController.php +1 −1 Original line number Diff line number Diff line Loading @@ -274,7 +274,7 @@ class EpisodeController extends BaseController ->from(config('Fediverse')->tablesPrefix . 'posts') ->where('episode_id', $this->episode->id); }) ->where('`published_at` <= NOW()', null, false) ->where('`published_at` <= UTC_TIMESTAMP()', null, false) ->orderBy('published_at', 'ASC'); $pageNumber = (int) $this->request->getGet('page'); Loading app/Controllers/MapController.php +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ class MapController extends BaseController $cacheName = 'episodes_markers'; if (! ($found = cache($cacheName))) { $episodes = (new EpisodeModel()) ->where('`published_at` <= NOW()', null, false) ->where('`published_at` <= UTC_TIMESTAMP()', null, false) ->where('location_geo is not', null) ->findAll(); $found = []; Loading app/Controllers/PodcastController.php +2 −2 Original line number Diff line number Diff line Loading @@ -287,11 +287,11 @@ class PodcastController extends BaseController if ($this->podcast->type === 'serial') { // podcast is serial $episodes = model(EpisodeModel::class) ->where('`published_at` <= NOW()', null, false) ->where('`published_at` <= UTC_TIMESTAMP()', null, false) ->orderBy('season_number DESC, number ASC'); } else { $episodes = model(EpisodeModel::class) ->where('`published_at` <= NOW()', null, false) ->where('`published_at` <= UTC_TIMESTAMP()', null, false) ->orderBy('published_at', 'DESC'); } Loading app/Database/Migrations/2020-06-05-190000_add_platforms.php +4 −2 Original line number Diff line number Diff line Loading @@ -41,8 +41,10 @@ class AddPlatforms extends Migration 'null' => true, ], ]); $this->forge->addField('`created_at` timestamp NOT NULL DEFAULT NOW()'); $this->forge->addField('`updated_at` timestamp NOT NULL DEFAULT NOW() ON UPDATE NOW()'); $this->forge->addField('`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP()'); $this->forge->addField( '`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP() ON UPDATE CURRENT_TIMESTAMP()' ); $this->forge->addPrimaryKey('slug'); $this->forge->createTable('platforms'); } Loading app/Database/Migrations/2020-12-25-150000_add_credit_view.php→app/Database/Migrations/2020-12-25-150000_add_credits_view.php +2 −4 Original line number Diff line number Diff line Loading @@ -3,8 +3,6 @@ declare(strict_types=1); /** * Class AddCreditView Creates Credit View in database * * @copyright 2020 Ad Aures * @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3 * @link https://castopod.org/ Loading @@ -14,7 +12,7 @@ namespace App\Database\Migrations; use CodeIgniter\Database\Migration; class AddCreditView extends Migration class AddCreditsView extends Migration { public function up(): void { Loading @@ -35,7 +33,7 @@ class AddCreditView extends Migration ON (`person_id`=`{$personsTable}`.`id`) INNER JOIN `{$episodesTable}` ON (`episode_id`=`{$episodesTable}`.`id`) WHERE `{$episodesTable}`.published_at <= NOW() WHERE `{$episodesTable}`.published_at <= UTC_TIMESTAMP() ORDER BY `person_group`, `full_name`, `person_role`, `podcast_id`, `episode_id`; CODE_SAMPLE; $this->db->query($createQuery); Loading Loading
app/Controllers/EpisodeController.php +1 −1 Original line number Diff line number Diff line Loading @@ -274,7 +274,7 @@ class EpisodeController extends BaseController ->from(config('Fediverse')->tablesPrefix . 'posts') ->where('episode_id', $this->episode->id); }) ->where('`published_at` <= NOW()', null, false) ->where('`published_at` <= UTC_TIMESTAMP()', null, false) ->orderBy('published_at', 'ASC'); $pageNumber = (int) $this->request->getGet('page'); Loading
app/Controllers/MapController.php +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ class MapController extends BaseController $cacheName = 'episodes_markers'; if (! ($found = cache($cacheName))) { $episodes = (new EpisodeModel()) ->where('`published_at` <= NOW()', null, false) ->where('`published_at` <= UTC_TIMESTAMP()', null, false) ->where('location_geo is not', null) ->findAll(); $found = []; Loading
app/Controllers/PodcastController.php +2 −2 Original line number Diff line number Diff line Loading @@ -287,11 +287,11 @@ class PodcastController extends BaseController if ($this->podcast->type === 'serial') { // podcast is serial $episodes = model(EpisodeModel::class) ->where('`published_at` <= NOW()', null, false) ->where('`published_at` <= UTC_TIMESTAMP()', null, false) ->orderBy('season_number DESC, number ASC'); } else { $episodes = model(EpisodeModel::class) ->where('`published_at` <= NOW()', null, false) ->where('`published_at` <= UTC_TIMESTAMP()', null, false) ->orderBy('published_at', 'DESC'); } Loading
app/Database/Migrations/2020-06-05-190000_add_platforms.php +4 −2 Original line number Diff line number Diff line Loading @@ -41,8 +41,10 @@ class AddPlatforms extends Migration 'null' => true, ], ]); $this->forge->addField('`created_at` timestamp NOT NULL DEFAULT NOW()'); $this->forge->addField('`updated_at` timestamp NOT NULL DEFAULT NOW() ON UPDATE NOW()'); $this->forge->addField('`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP()'); $this->forge->addField( '`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP() ON UPDATE CURRENT_TIMESTAMP()' ); $this->forge->addPrimaryKey('slug'); $this->forge->createTable('platforms'); } Loading
app/Database/Migrations/2020-12-25-150000_add_credit_view.php→app/Database/Migrations/2020-12-25-150000_add_credits_view.php +2 −4 Original line number Diff line number Diff line Loading @@ -3,8 +3,6 @@ declare(strict_types=1); /** * Class AddCreditView Creates Credit View in database * * @copyright 2020 Ad Aures * @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3 * @link https://castopod.org/ Loading @@ -14,7 +12,7 @@ namespace App\Database\Migrations; use CodeIgniter\Database\Migration; class AddCreditView extends Migration class AddCreditsView extends Migration { public function up(): void { Loading @@ -35,7 +33,7 @@ class AddCreditView extends Migration ON (`person_id`=`{$personsTable}`.`id`) INNER JOIN `{$episodesTable}` ON (`episode_id`=`{$episodesTable}`.`id`) WHERE `{$episodesTable}`.published_at <= NOW() WHERE `{$episodesTable}`.published_at <= UTC_TIMESTAMP() ORDER BY `person_group`, `full_name`, `person_role`, `podcast_id`, `episode_id`; CODE_SAMPLE; $this->db->query($createQuery); Loading