From 34e1a6ee08e4626ebfb6d3078693ed3d989b21fe Mon Sep 17 00:00:00 2001 From: tenma Date: Tue, 7 Apr 2020 02:42:40 +0100 Subject: [PATCH] [OStatus] Remove TFN's deprecated Census event and fix small typo in the code --- plugins/OStatus/OStatusPlugin.php | 16 ++-------------- plugins/OStatus/classes/Ostatus_profile.php | 2 +- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php index 3380c92f1b..bcc98b941b 100644 --- a/plugins/OStatus/OStatusPlugin.php +++ b/plugins/OStatus/OStatusPlugin.php @@ -1440,18 +1440,6 @@ class OStatusPlugin extends Plugin return true; } - /** - * Subscribe OS's profile class to the TFN module - * - * @param array $federation - * @return bool event hook return - */ - public function onStartTFNCensus(array &$federation): bool - { - $federation[] = 'Ostatus_profile'; - return true; - } - /** * Utility function to check if the given URI is a canonical group profile * page, and if so return the ID number. @@ -1704,10 +1692,10 @@ class OStatusPlugin extends Plugin $qm->enqueue($item, 'pushrenew'); } } - + /** * Try to grab and store the remote profile by the given uri - * + * * @param string $uri * @param Profile &$profile * @return bool diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php index 9c1e5d27d6..78692ee52b 100644 --- a/plugins/OStatus/classes/Ostatus_profile.php +++ b/plugins/OStatus/classes/Ostatus_profile.php @@ -1217,7 +1217,7 @@ class Ostatus_profile extends Managed_DataObject // Yes! Avoid creating a new profile $oprofile->profile_id = $profile_id; - if ($profile->insert() === false) { + if ($oprofile->insert() === false) { // TRANS: Server exception. throw new ServerException(_m('Cannot save OStatus profile.')); }