From 12bbeba6b3c19d8ddd81cb1b6cadf2938552280f Mon Sep 17 00:00:00 2001 From: Luke Edwards Date: Fri, 1 Jun 2018 09:27:42 +1200 Subject: [PATCH] MINOR Template use class name, fix episode thumbnail --- src/Control/PodcastPageController.php | 2 +- src/Model/PodcastEpisode.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Control/PodcastPageController.php b/src/Control/PodcastPageController.php index a39d324..4a79706 100644 --- a/src/Control/PodcastPageController.php +++ b/src/Control/PodcastPageController.php @@ -31,7 +31,7 @@ public function init() public function rss() { $this->response->addHeader("Content-Type", "application/xml"); - return $this->renderWith("Lukereative\RSS\PodcastRSSFeed"); + return $this->renderWith($this->ClassName . '_rss'); } /** diff --git a/src/Model/PodcastEpisode.php b/src/Model/PodcastEpisode.php index 33cb9e8..136d2c4 100644 --- a/src/Model/PodcastEpisode.php +++ b/src/Model/PodcastEpisode.php @@ -13,7 +13,7 @@ class PodcastEpisode extends DataObject { private static $table_name = 'PodcastEpisode'; - + private static $has_one = [ 'File' => File::class, 'Image' => Image::class, @@ -46,7 +46,7 @@ class PodcastEpisode extends DataObject ]; private static $summary_fields = [ - 'Thumb' => 'Image', + 'Thumb' => '', 'Date' => 'Date', 'Title' => 'Title', 'Duration' => 'Duration', @@ -59,7 +59,7 @@ class PodcastEpisode extends DataObject public function populateDefaults() { parent::populateDefaults(); - + $this->Date = DBDatetime::now()->value; } @@ -122,7 +122,7 @@ public function relativeEpisodeLink() * Returns a thumbnail of the Episode Image * @return Image */ - public function episodeThumb() + public function thumb() { return $this->Image()->fill(40, 40); }