diff --git a/plugins/share/init.php b/plugins/share/init.php
index 6b7b81a2d..4c47e29d3 100644
--- a/plugins/share/init.php
+++ b/plugins/share/init.php
@@ -96,7 +96,7 @@ class Share extends Plugin {
$id = $row["ref_id"];
$owner_uid = $row["owner_uid"];
- print $this->format_article($id, $owner_uid);
+ $this->format_article($id, $owner_uid);
return;
}
@@ -125,8 +125,6 @@ class Share extends Plugin {
WHERE id = ? AND ref_id = id AND owner_uid = ?");
$sth->execute([$id, $owner_uid]);
- $rv = '';
-
if ($line = $sth->fetch()) {
$line["tags"] = Article::_get_tags($id, $owner_uid, $line["tag_cache"]);
@@ -142,106 +140,90 @@ class Share extends Plugin {
},
$line);
+ $enclosures = Article::_get_enclosures($line["id"]);
+ list ($og_image, $og_stream) = Article::_get_image($enclosures, $line['content'], $line["site_url"]);
+
+ $content_decoded = html_entity_decode($line["title"], ENT_NOQUOTES | ENT_HTML401);
+ $parsed_updated = TimeHelper::make_local_datetime($line["updated"], true, $owner_uid, true);
+
$line['content'] = DiskCache::rewrite_urls($line['content']);
- header("Content-Type: text/html");
+ ob_start();
- $rv .= "
-
-
- ".$line["title"]."".
- javascript_tag("lib/prototype.js").
- javascript_tag("js/utility.js")."
+ ?>
+
+
+
+
+ = $line["title"] ?>
+ = javascript_tag("lib/prototype.js") ?>
+ = javascript_tag("js/utility.js") ?>
-
- ";
+
+
- $rv .= "\n";
- $rv .= "
+ \n";
+ ), 500, "...")) ?>">
+
- $rv .= "";
+
+
+
- $enclosures = Article::_get_enclosures($line["id"]);
- list ($og_image, $og_stream) = Article::_get_image($enclosures, $line['content'], $line["site_url"]);
+
+
- if ($og_image) {
- $rv .= "
";
- }
+
+
+
+
= $line["title"] ?>
+
- $rv .= "";
- $rv .= "
";
+
+
- if ($line["link"]) {
- $rv .= "
";
- } else {
- $rv .= "
" . $line["title"] . "
";
- }
+
">
+ = $line["content"] ?>
+
+
+
+
+ ";
+ $rv = ob_get_contents();
+ ob_end_clean();
- /* header */
-
- $rv .= ""; # header
-
- /* content */
-
- $lang = $line['lang'] ? $line['lang'] : "en";
- $rv .= "
";
-
- /* content body */
-
- $rv .= $line["content"];
-
- /* $rv .= Article::format_article_enclosures($id,
- $line["always_display_enclosures"],
- $line["content"],
- $line["hide_images"]); */
-
- $rv .= "
"; # content
-
- $rv .= "
"; # post
-
- }
-
- PluginHost::getInstance()->chain_hooks_callback(PluginHost::HOOK_FORMAT_ARTICLE,
+ PluginHost::getInstance()->chain_hooks_callback(PluginHost::HOOK_FORMAT_ARTICLE,
function ($result) use (&$rv) {
$rv = $result;
},
$rv, $line);
- return $rv;
-
+ print $rv;
+ }
}
function shareDialog() {