From: Mikael Nordfeldth Date: Sat, 22 Oct 2016 21:08:44 +0000 (+0200) Subject: some debugging calls and make sure $hints['feedurl'] gets set with $feeduri in case... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6ebc5f0bff02bb7dc98bb352e10becb6998818af;p=quix0rs-gnu-social.git some debugging calls and make sure $hints['feedurl'] gets set with $feeduri in case that variable is used. --- diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php index ad23542cfd..cd3f4f6e6c 100644 --- a/plugins/OStatus/classes/Ostatus_profile.php +++ b/plugins/OStatus/classes/Ostatus_profile.php @@ -1116,6 +1116,8 @@ class Ostatus_profile extends Managed_DataObject */ protected static function createActivityObjectProfile(ActivityObject $object, array $hints=array()) { + common_debug('Attempting to create an Ostatus_profile from an ActivityObject with ID: '._ve($object->id)); + $homeuri = $object->id; $discover = false; @@ -1145,12 +1147,12 @@ class Ostatus_profile extends Managed_DataObject } } - if (array_key_exists('feedurl', $hints)) { - $feeduri = $hints['feedurl']; - } else { + if (!array_key_exists('feedurl', $hints)) { $discover = new FeedDiscovery(); - $feeduri = $discover->discoverFromURL($homeuri); + $hints['feedurl'] = $discover->discoverFromURL($homeuri); + common_debug(__METHOD__.' did not have a "feedurl" hint, FeedDiscovery found '._ve($hints['feedurl'])); } + $feeduri = $hints['feedurl']; if (array_key_exists('salmon', $hints)) { $salmonuri = $hints['salmon']; @@ -1287,6 +1289,8 @@ class Ostatus_profile extends Managed_DataObject throw new AuthorizationException('Trying to update profile from ActivityObject with different URI.'); } + common_debug('Updating Ostatus_profile with URI '._ve($this->getUri()).' from ActivityObject'); + if ($this->isGroup()) { $group = $this->localGroup(); self::updateGroup($group, $object, $hints);