Browse Source

rename unfairly prefixed get_enclosures() in feeditem

master
Andrew Dolgov 1 year ago
parent
commit
e8e6329040
  1. 2
      classes/feeditem.php
  2. 4
      classes/feeditem/atom.php
  3. 2
      classes/feeditem/common.php
  4. 4
      classes/feeditem/rss.php
  5. 2
      classes/rssutils.php

2
classes/feeditem.php

@ -9,7 +9,7 @@ abstract class FeedItem {
abstract function get_comments_url();
abstract function get_comments_count();
abstract function get_categories();
abstract function _get_enclosures();
abstract function get_enclosures();
abstract function get_author();
abstract function get_language();
}

4
classes/feeditem/atom.php

@ -119,7 +119,7 @@ class FeedItem_Atom extends FeedItem_Common {
return $this->normalize_categories($cats);
}
function _get_enclosures() {
function get_enclosures() {
$links = $this->elem->getElementsByTagName("link");
$encs = array();
@ -138,7 +138,7 @@ class FeedItem_Atom extends FeedItem_Common {
}
}
$encs = array_merge($encs, parent::_get_enclosures());
$encs = array_merge($encs, parent::get_enclosures());
return $encs;
}

2
classes/feeditem/common.php

@ -78,7 +78,7 @@ abstract class FeedItem_Common extends FeedItem {
}
// this is common for both Atom and RSS types and deals with various media: elements
function _get_enclosures() {
function get_enclosures() {
$encs = [];
$enclosures = $this->xpath->query("media:content", $this->elem);

4
classes/feeditem/rss.php

@ -112,7 +112,7 @@ class FeedItem_RSS extends FeedItem_Common {
return $this->normalize_categories($cats);
}
function _get_enclosures() {
function get_enclosures() {
$enclosures = $this->elem->getElementsByTagName("enclosure");
$encs = array();
@ -129,7 +129,7 @@ class FeedItem_RSS extends FeedItem_Common {
array_push($encs, $enc);
}
$encs = array_merge($encs, parent::_get_enclosures());
$encs = array_merge($encs, parent::get_enclosures());
return $encs;
}

2
classes/rssutils.php

@ -744,7 +744,7 @@ class RSSUtils {
$enclosures = array();
$encs = $item->_get_enclosures();
$encs = $item->get_enclosures();
if (is_array($encs)) {
foreach ($encs as $e) {

Loading…
Cancel
Save