aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Articles.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-11-04 14:26:12 -0800
committerzotlabs <mike@macgirvin.com>2019-11-04 14:26:12 -0800
commit1358a81c32ff9dff2e88b196c63f299788b05b57 (patch)
treedc9210141cf787893eb5bbd9729b24b56bf4fa4d /Zotlabs/Module/Articles.php
parent2d08e0955a328fa53f373949f58995ca2a8b736a (diff)
parentaa137fb2d2ddd71f89eea4618cac1594d020ed3a (diff)
downloadvolse-hubzilla-1358a81c32ff9dff2e88b196c63f299788b05b57.tar.gz
volse-hubzilla-1358a81c32ff9dff2e88b196c63f299788b05b57.tar.bz2
volse-hubzilla-1358a81c32ff9dff2e88b196c63f299788b05b57.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'Zotlabs/Module/Articles.php')
-rw-r--r--Zotlabs/Module/Articles.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/Zotlabs/Module/Articles.php b/Zotlabs/Module/Articles.php
index ca132c01e..e3ad54be8 100644
--- a/Zotlabs/Module/Articles.php
+++ b/Zotlabs/Module/Articles.php
@@ -9,6 +9,7 @@ use Zotlabs\Lib\PermissionDescription;
require_once('include/channel.php');
require_once('include/conversation.php');
require_once('include/acl_selectors.php');
+require_once('include/opengraph.php');
class Articles extends Controller {
@@ -192,7 +193,7 @@ class Articles extends Controller {
$parents_str = ids_to_querystr($r,'id');
- $items = q("SELECT item.*, item.id AS item_id
+ $r = q("SELECT item.*, item.id AS item_id
FROM item
WHERE item.uid = %d $item_normal
AND item.parent IN ( %s )
@@ -200,15 +201,18 @@ class Articles extends Controller {
intval(App::$profile['profile_uid']),
dbesc($parents_str)
);
- if($items) {
- xchan_query($items);
- $items = fetch_post_tags($items, true);
+ if($r) {
+ xchan_query($r);
+ $items = fetch_post_tags($r, true);
$items = conv_sort($items,'updated');
}
else
$items = [];
}
+ // Add Opengraph markup
+ opengraph_add_meta(((! empty($items)) ? $r[0] : array()), App::$profile);
+
$mode = 'articles';
if(get_pconfig(local_channel(),'system','articles_list_mode') && (! $selected_card))