aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Channel.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-11-19 09:33:13 +0000
committerMario <mario@mariovavti.com>2019-11-19 09:33:13 +0000
commiteec42d3bb320c76318632a2acc7d48892c73abce (patch)
treeb607c4e1183960333837309493f918f44ee9e956 /Zotlabs/Module/Channel.php
parentbd049eddd4fa79d6960746d884fc6f5c8defd8e8 (diff)
parente762347080283f60ac67295767348895f626c367 (diff)
downloadvolse-hubzilla-eec42d3bb320c76318632a2acc7d48892c73abce.tar.gz
volse-hubzilla-eec42d3bb320c76318632a2acc7d48892c73abce.tar.bz2
volse-hubzilla-eec42d3bb320c76318632a2acc7d48892c73abce.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'Zotlabs/Module/Channel.php')
-rw-r--r--Zotlabs/Module/Channel.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php
index 3f617fd18..d975ac1bf 100644
--- a/Zotlabs/Module/Channel.php
+++ b/Zotlabs/Module/Channel.php
@@ -110,8 +110,20 @@ class Channel extends Controller {
// Run profile_load() here to make sure the theme is set before
// we start loading content
-
profile_load($which,$profile);
+
+ // Add Opengraph markup
+ $mid = ((x($_REQUEST,'mid')) ? $_REQUEST['mid'] : '');
+ if(strpos($mid,'b64.') === 0)
+ $mid = @base64url_decode(substr($mid,4));
+
+ if($mid)
+ $r = q("SELECT * FROM item WHERE mid = '%s' AND uid = %d AND item_private = 0 LIMIT 1",
+ dbesc($mid),
+ intval($channel['channel_id'])
+ );
+
+ opengraph_add_meta($r ? $r[0] : [], $channel);
}
function get($update = 0, $load = false) {
@@ -375,9 +387,6 @@ class Channel extends Controller {
$items = array();
}
- // Add Opengraph markup
- opengraph_add_meta((isset($decoded) && (! empty($items)) ? $r[0] : array()), App::$profile);
-
if((! $update) && (! $load)) {
if($decoded)