Browse Source

real fix for quotation-of

pull/78/head v1.4.34
Aaron Parecki 6 years ago
parent
commit
e1600cc5bc
No known key found for this signature in database GPG Key ID: 276C2817346D6056
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      lib/XRay/Formats/Mf2.php

+ 6
- 2
lib/XRay/Formats/Mf2.php View File

@ -414,7 +414,7 @@ class Mf2 extends Format {
$refs = []; $refs = [];
// Single plaintext and URL values // Single plaintext and URL values
self::collectSingleValues(['published','summary','rsvp','swarm-coins'], ['url','featured','quotation-of'], $item, $url, $data);
self::collectSingleValues(['published','summary','rsvp','swarm-coins'], ['url','featured'], $item, $url, $data);
if(isset($data['rsvp'])) if(isset($data['rsvp']))
$data['rsvp'] = strtolower($data['rsvp']); $data['rsvp'] = strtolower($data['rsvp']);
@ -431,7 +431,11 @@ class Mf2 extends Format {
// These properties are always returned as arrays and always URLs // These properties are always returned as arrays and always URLs
// If the value is an h-* object with a URL, the URL is used and a "ref" is added as well // If the value is an h-* object with a URL, the URL is used and a "ref" is added as well
self::collectArrayURLValues(['photo','video','audio','syndication','in-reply-to','like-of','repost-of','bookmark-of'], $item, $data, $refs, $http);
self::collectArrayURLValues(['photo','video','audio','syndication','in-reply-to','like-of','repost-of','bookmark-of','quotation-of'], $item, $data, $refs, $http);
// Hack to make quotation-of a single value
if(isset($data['quotation-of']))
$data['quotation-of'] = $data['quotation-of'][0];
self::determineNameAndContent($item, $data); self::determineNameAndContent($item, $data);

Loading…
Cancel
Save