diff options
author | Max Kostikov <max@kostikov.co> | 2019-11-18 15:40:51 +0100 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2019-11-18 15:40:51 +0100 |
commit | c7a05264282122162fc43bb680924daf8f22a95f (patch) | |
tree | 6f3d0ae05c7fc3b28ee9d4f4f00d279836d782f2 /Zotlabs/Module | |
parent | 498c021aec25d845c67150475294066113de6d20 (diff) | |
download | volse-hubzilla-c7a05264282122162fc43bb680924daf8f22a95f.tar.gz volse-hubzilla-c7a05264282122162fc43bb680924daf8f22a95f.tar.bz2 volse-hubzilla-c7a05264282122162fc43bb680924daf8f22a95f.zip |
Move back Opengraph markup creation to init stage
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Channel.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php index 3bf7ad501..6034bd7da 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) { |