Skip to content

Commit

Permalink
Fixes rss feed issue when itunes_cats is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
dleffler committed Mar 15, 2012
1 parent 2dd6a21 commit 6982b54
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions site_rss.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,18 @@
if (isset($site_rss->rss_cachetime)) { $ttl = $site_rss->rss_cachetime; }
if ($site_rss->rss_cachetime == 0) { $site_rss->rss_cachetime = 1440; }

$ic = explode(";", $site_rss->itunes_cats);
$x = 0;
$itunes_cats = array();
foreach($ic as $cat){
$cat_sub = explode(":", $cat);
$itunes_cats[$x]->category = $cat_sub[0];
if(isset($cat_sub[1])) {
$itunes_cats[$x]->subcategory = $cat_sub[1];
if (!empty($site_rss->itunes_cats)) {
$ic = explode(";", $site_rss->itunes_cats);
$x = 0;
$itunes_cats = array();
foreach($ic as $cat){
$cat_sub = explode(":", $cat);
$itunes_cats[$x]->category = $cat_sub[0];
if(isset($cat_sub[1])) {
$itunes_cats[$x]->subcategory = $cat_sub[1];
}
$x++;
}
$x++;
}

if ($site_rss->enable_rss == true) {
Expand Down

0 comments on commit 6982b54

Please sign in to comment.