X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FUtil%2FJsonLD.php;h=427205958f846d5bfa7ac101d751a88fba0d39bf;hb=4097808b95dcdac41fd4146a560eb6f941891c94;hp=8d609625e04281826f16ffec98d18f787dbce180;hpb=4faf08c0643d3e6bbe2a0a77be2ff8c1dbea4d5c;p=friendica.git diff --git a/src/Util/JsonLD.php b/src/Util/JsonLD.php index 8d609625e0..427205958f 100644 --- a/src/Util/JsonLD.php +++ b/src/Util/JsonLD.php @@ -44,26 +44,38 @@ class JsonLD { switch ($url) { case 'https://w3id.org/security/v1': - $url = DI::baseUrl() . '/static/security-v1.jsonld'; + $url = DI::basePath() . '/static/security-v1.jsonld'; + break; + case 'https://w3id.org/security/data-integrity/v1': + $url = DI::basePath() . '/static/security-data-integrity-v1.jsonld'; + break; + case 'https://w3id.org/security/multikey/v1': + $url = DI::basePath() . '/static/security-multikey-v1.jsonld'; break; case 'https://w3id.org/identity/v1': - $url = DI::baseUrl() . '/static/identity-v1.jsonld'; + $url = DI::basePath() . '/static/identity-v1.jsonld'; break; case 'https://www.w3.org/ns/activitystreams': - $url = DI::baseUrl() . '/static/activitystreams.jsonld'; + $url = DI::basePath() . '/static/activitystreams.jsonld'; break; case 'https://funkwhale.audio/ns': - $url = DI::baseUrl() . '/static/funkwhale.audio.jsonld'; + $url = DI::basePath() . '/static/funkwhale.audio.jsonld'; + break; + case 'http://schema.org': + $url = DI::basePath() . '/static/schema.jsonld'; + break; + case 'http://joinmastodon.org/ns': + $url = DI::basePath() . '/static/joinmastodon.jsonld'; break; default: switch (parse_url($url, PHP_URL_PATH)) { case '/schemas/litepub-0.1.jsonld'; - $url = DI::baseUrl() . '/static/litepub-0.1.jsonld'; + $url = DI::basePath() . '/static/litepub-0.1.jsonld'; break; case '/apschema/v1.2': case '/apschema/v1.9': case '/apschema/v1.10': - $url = DI::baseUrl() . '/static/apschema.jsonld'; + $url = DI::basePath() . '/static/apschema.jsonld'; break; default: Logger::info('Got url', ['url' =>$url]); @@ -177,12 +189,6 @@ class JsonLD if (!in_array('https://w3id.org/security/v1', $json['@context'])) { $json['@context'][] = 'https://w3id.org/security/v1'; } - - // Issue 12419: Workaround for GoToSocial - $pos = array_search('http://joinmastodon.org/ns', $json['@context']); - if (is_int($pos)) { - $json['@context'][$pos] = ['toot' => 'http://joinmastodon.org/ns#']; - } } // Bookwyrm transmits "id" fields with "null", which isn't allowed.