X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Factivitycontext.php;h=09a457924963a22d3bb3bafeaf34c67a2ce00d2a;hb=08fc6053ec55e911b842fd05dafc5e0c99c4e992;hp=5afbb7fd28b75b4bc36315a74f1e3cecd3b3f944;hpb=4fdfc6b1ce7e5ffa50b24bdddca55cc73d54a09f;p=quix0rs-gnu-social.git diff --git a/lib/activitycontext.php b/lib/activitycontext.php index 5afbb7fd28..09a4579249 100644 --- a/lib/activitycontext.php +++ b/lib/activitycontext.php @@ -71,6 +71,7 @@ class ActivityContext $links = $element->getElementsByTagNameNS(ActivityUtils::ATOM, ActivityUtils::LINK); + $attention = array(); for ($i = 0; $i < $links->length; $i++) { $link = $links->item($i); @@ -80,11 +81,12 @@ class ActivityContext // XXX: Deprecate this in favour of "mentioned" from Salmon spec // http://salmon-protocol.googlecode.com/svn/trunk/draft-panzer-salmon-00.html#SALR if ($linkRel == self::ATTENTION) { - $this->attention[] = $link->getAttribute(self::HREF); + $attention[] = $link->getAttribute(self::HREF); } elseif ($linkRel == self::MENTIONED) { - $this->attention[] = $link->getAttribute(self::HREF); + $attention[] = $link->getAttribute(self::HREF); } } + $this->attention = array_unique($attention); } /**