Skip to content

Commit

Permalink
Revert "Merge pull request #3 from howardgrigg/small-fixes"
Browse files Browse the repository at this point in the history
This reverts commit ee6ae7b, reversing
changes made to 32e93d2.
  • Loading branch information
lukereative committed Aug 2, 2013
1 parent ee6ae7b commit 283b0aa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
14 changes: 8 additions & 6 deletions code/dataobjects/PodcastEpisode.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,12 @@ public function getMime() {
,'avi' => 'video/x-msvideo'
,'3gp' => 'video/3gpp'
);
$path_parts = pathinfo($filename);

return $mime_types[$path_parts['extension']];
}

$extension = strtolower(end(explode('.', $filename)));

return $mime_types[$extension];
}

/**
* Returns the type for page template for audio, video tags or download link
* @return string
Expand All @@ -141,8 +142,9 @@ public function getType() {
,'avi' => 'video'
,'3gp' => 'video'
);
$path_parts = pathinfo($filename);

return $mime_types[$path_parts['extension']];
$extension = strtolower(end(explode('.', $filename)));

return $mime_types[$extension];
}
}
12 changes: 2 additions & 10 deletions code/pagetypes/PodcastPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,7 @@ public function rss() {
* @return SS_List
*/
public function podcastEpisodes() {
return PodcastEpisode::get()
->filter(array(
'BlockEpisode' => '0',
'PodcastPageID' => $this->ID
))
->sort('EpisodeDate', 'DESC');
return PodcastEpisode::get()->sort('EpisodeDate', 'DESC');
}


Expand All @@ -224,10 +219,7 @@ public function podcastEpisodes() {
public function paginatedPodcastEpisodes() {
$paginatedList = new PaginatedList(
PodcastEpisode::get()
->filter(array(
'BlockEpisode' => '0',
'PodcastPageID' => $this->ID
))
->filter(array('BlockEpisode' => '0'))
->sort('EpisodeDate', 'DESC')
, $this->request
);
Expand Down

0 comments on commit 283b0aa

Please sign in to comment.