From: Mikael Nordfeldth Date: Fri, 20 Feb 2015 13:47:12 +0000 (+0100) Subject: ensureFeedURL will return Ostatus_profile early if already stored X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c1e3cfe7a782aa81b4d478901305ecd1ebc905cc;p=quix0rs-gnu-social.git ensureFeedURL will return Ostatus_profile early if already stored --- diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php index 325e602653..77b1e9bef5 100644 --- a/plugins/OStatus/classes/Ostatus_profile.php +++ b/plugins/OStatus/classes/Ostatus_profile.php @@ -1120,6 +1120,11 @@ class Ostatus_profile extends Managed_DataObject */ public static function ensureFeedURL($feed_url, array $hints=array()) { + $oprofile = Ostatus_profile::getKV('feeduri', $feed_url); + if ($oprofile instanceof Ostatus_profile) { + return $oprofile; + } + $discover = new FeedDiscovery(); $feeduri = $discover->discoverFromFeedURL($feed_url);