Skip to content

Commit

Permalink
allow atom keyword, reduce noise
Browse files Browse the repository at this point in the history
  • Loading branch information
andibraeu committed Apr 1, 2022
1 parent 343668a commit 3d9c7be
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
if ( ! empty($community['feeds'] ) ) {
foreach($community['feeds'] as $feed )
{
if ( ! empty($feed['category']) && $feed['category'] == $category && !empty($feed['type']) && strtolower($feed['type']) == "rss" ) {
if ( ! empty($feed['category']) && $feed['category'] == $category && !empty($feed['type']) && (strtolower($feed['type']) == "rss" || strtolower($feed['type']) == "atom" ) ) {
if ( array_key_exists($feed['url'], $feeds) ) {
array_push($feeds[$feed['url']][3], $indexName);
} else {
Expand Down
1 change: 0 additions & 1 deletion mergedrss.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ private function __fetch_rss_from_url($url) {
$fp = $this->curl_exec_follow($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ( ! curl_errno($ch) && $code >= 200 && $code < 300) {
error_log($url);
$sxe = simplexml_load_string($fp);
} else {
error_log("cannot load feed " . $url . ", with cause: " . curl_errno($ch) . " or error code " .$code);
Expand Down

0 comments on commit 3d9c7be

Please sign in to comment.