]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
ensureFeedURL will return Ostatus_profile early if already stored
authorMikael Nordfeldth <mmn@hethane.se>
Fri, 20 Feb 2015 13:47:12 +0000 (14:47 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Fri, 20 Feb 2015 13:47:12 +0000 (14:47 +0100)
plugins/OStatus/classes/Ostatus_profile.php

index 325e602653664425e7f78d3df9619fbd1c1d2924..77b1e9bef5ae179a67d8ef24bdf132c11b2de088 100644 (file)
@@ -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);