From 8d1489bb722056080a4ce58cc5c3ab404c679e71 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Mon, 29 Feb 2016 17:28:36 -0800 Subject: [PATCH] fix for target param. include bookmark-of property --- controllers/Parse.php | 6 +++--- lib/Formats/Mf2.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/controllers/Parse.php b/controllers/Parse.php index ad8bacb..ed074a8 100644 --- a/controllers/Parse.php +++ b/controllers/Parse.php @@ -99,12 +99,12 @@ class Parse { $found = []; foreach($xpath->query('//a[@href]') as $href) { - $url = $href->getAttribute('href'); + $u = $href->getAttribute('href'); if($target) { # target parameter was provided - if($url == $target) { - $found[$url] = null; + if($u == $target) { + $found[$u] = null; } } } diff --git a/lib/Formats/Mf2.php b/lib/Formats/Mf2.php index da18f4b..f0137f0 100644 --- a/lib/Formats/Mf2.php +++ b/lib/Formats/Mf2.php @@ -78,7 +78,7 @@ class Mf2 { } // Always returned as arrays, and may also create external references - $properties = ['in-reply-to','like-of','repost-of','category']; + $properties = ['in-reply-to','like-of','repost-of','bookmark-of','category']; foreach($properties as $p) { if(array_key_exists($p, $item['properties'])) { $data[$p] = [];