summaryrefslogtreecommitdiff
path: root/classes/feeds.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/feeds.php')
-rwxr-xr-xclasses/feeds.php46
1 files changed, 33 insertions, 13 deletions
diff --git a/classes/feeds.php b/classes/feeds.php
index 68d535481..f2cfa5b7f 100755
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -244,6 +244,38 @@ class Feeds extends Handler_Protected {
},
$line);
+ $this->_mark_timestamp(" pre-enclosures");
+
+ if ($line["num_enclosures"] > 0) {
+ $enclosures = Article::_get_enclosures($id);
+
+ $line["enclosures"] = Article::_format_enclosures($id,
+ $line["always_display_enclosures"],
+ $line["content"],
+ $line["hide_images"],
+ $enclosures);
+
+ } else {
+ $enclosures = [];
+ $line["enclosures"] = [ 'formatted' => '', 'entries' => [] ];
+ }
+
+ $this->_mark_timestamp(" enclosures");
+
+ list ($flavor_image, $flavor_stream, $flavor_kind) = Article::_get_image($enclosures,
+ $line["content"], // unsanitized
+ $line["site_url"],
+ $line);
+
+ $line["flavor_image"] = $flavor_image;
+ $line["flavor_stream"] = $flavor_stream;
+
+ /* optional */
+ if ($flavor_kind)
+ $line["flavor_kind"] = $flavor_kind;
+
+ $this->_mark_timestamp(" flavor image");
+
$this->_mark_timestamp(" pre-sanitize");
$line["content"] = Sanitizer::sanitize($line["content"],
@@ -261,19 +293,6 @@ class Feeds extends Handler_Protected {
}
}
- $this->_mark_timestamp(" pre-enclosures");
-
- if ($line["num_enclosures"] > 0) {
- $line["enclosures"] = Article::_format_enclosures($id,
- $line["always_display_enclosures"],
- $line["content"],
- $line["hide_images"]);
- } else {
- $line["enclosures"] = [ 'formatted' => '', 'entries' => [] ];
- }
-
- $this->_mark_timestamp(" enclosures");
-
$line["updated_long"] = TimeHelper::make_local_datetime($line["updated"],true);
$line["updated"] = TimeHelper::make_local_datetime($line["updated"], false, false, false, true);
@@ -315,6 +334,7 @@ class Feeds extends Handler_Protected {
}
$this->_mark_timestamp(" color");
+
$this->_mark_timestamp(" pre-hook_render_cdm");
PluginHost::getInstance()->chain_hooks_callback(PluginHost::HOOK_RENDER_ARTICLE_CDM,