Skip to content

Commit

Permalink
MINOR Template use class name, fix episode thumbnail
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Edwards committed May 31, 2018
1 parent c65c899 commit 12bbeba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Control/PodcastPageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

/**
Expand Down
8 changes: 4 additions & 4 deletions src/Model/PodcastEpisode.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class PodcastEpisode extends DataObject
{
private static $table_name = 'PodcastEpisode';

private static $has_one = [
'File' => File::class,
'Image' => Image::class,
Expand Down Expand Up @@ -46,7 +46,7 @@ class PodcastEpisode extends DataObject
];

private static $summary_fields = [
'Thumb' => 'Image',
'Thumb' => '',
'Date' => 'Date',
'Title' => 'Title',
'Duration' => 'Duration',
Expand All @@ -59,7 +59,7 @@ class PodcastEpisode extends DataObject
public function populateDefaults()
{
parent::populateDefaults();

$this->Date = DBDatetime::now()->value;
}

Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 12bbeba

Please sign in to comment.