Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

Commit

Permalink
remove format field
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansl committed Aug 5, 2015
1 parent 6164741 commit bd96dad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 32 deletions.
24 changes: 5 additions & 19 deletions classes/NewsPodcasts.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,7 @@ protected function generateFiles( $arrFeed )
return;
}

switch ( $arrFeed['format'] ) {
case 'rss':
$strType = 'generateRss';
break;

case 'atom':
$strType = 'generateAtom';
break;

case 'itunes':
$strType = 'generateItunes';
break;
}

$strType = 'generateItunes';

$strLink = $arrFeed['feedBase'] ?: \Environment::get( 'base' );
$strFile = $arrFeed['feedName'];
Expand All @@ -143,16 +130,15 @@ protected function generateFiles( $arrFeed )
$objFeed->published = $arrFeed['tstamp'];

//Add Feed Image
if ( $arrFeed['format'] == 'itunes' ) {
$objFile = \FilesModel::findByUuid( $arrFeed['image'] );

if ( $objFile !== null ) {
$objFeed->imageUrl = \Environment::get( 'base' ) . $objFile->path;
}
$objFile = \FilesModel::findByUuid( $arrFeed['image'] );

if ( $objFile !== null ) {
$objFeed->imageUrl = \Environment::get( 'base' ) . $objFile->path;
}



// Get the items
if ( $arrFeed['maxItems'] > 0 ) {
$objPodcasts = \NewsModel::findPublishedByPids( $arrArchives, null, $arrFeed['maxItems'], null, array( 'column' => 'addPodcast', 'value' => 1 ) );
Expand Down
14 changes: 1 addition & 13 deletions dca/tl_news_podcasts_feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
// Palettes
'palettes' => array
(
'default' => '{title_legend},title,alias,language,format;{description_legend},description,category;{author_legend},owner,email,image,author,copyright;{archives_legend},archives;{config_legend},maxItems,feedBase'
'default' => '{title_legend},title,alias,language;{description_legend},description,category;{author_legend},owner,email,image,author,copyright;{archives_legend},archives;{config_legend},maxItems,feedBase'
),

// Fields
Expand Down Expand Up @@ -144,18 +144,6 @@
'eval' => array('mandatory'=>true, 'maxlength'=>32, 'tl_class'=>'w50'),
'sql' => "varchar(32) NOT NULL default ''"
),
'format' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_news_podcasts_feed']['format'],
'default' => 'text',
'exclude' => true,
'filter' => true,
'inputType' => 'select',
//'options_callback' => array('tl_news_podcasts_feed', 'getRssType'),
'options' => array('itunes'),
'eval' => array('submitOnChange'=>true, 'tl_class'=>'w50'),
'sql' => "varchar(32) NOT NULL default ''"
),
'subtitle' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_news_podcasts_feed']['subtitle'],
Expand Down

0 comments on commit bd96dad

Please sign in to comment.