]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/OStatus.php
Merge branch 'bug/phpinfo-accessible-hotfix' into 2020.09-rc
[friendica.git] / src / Protocol / OStatus.php
index 74a055265db795502f20e01bea8e40f6bd4622e5..0635be87d1c9a83191d80ac0bed7d349b06ed577 100644 (file)
@@ -219,7 +219,7 @@ class OStatus
                        }
 
                        // Ensure that we are having this contact (with uid=0)
-                       $cid = Contact::getIdForURL($aliaslink, 0, false);
+                       $cid = Contact::getIdForURL($aliaslink);
 
                        if ($cid) {
                                $fields = ['url', 'nurl', 'name', 'nick', 'alias', 'about', 'location'];
@@ -544,15 +544,8 @@ class OStatus
                                                } elseif ($item['contact-id'] < 0) {
                                                        Logger::log("Item with uri ".$item["uri"]." is from a blocked contact.", Logger::DEBUG);
                                                } else {
-                                                       // We are having duplicated entries. Hopefully this solves it.
-                                                       if (DI::lock()->acquire('ostatus_process_item_insert')) {
-                                                               $ret = Item::insert($item);
-                                                               DI::lock()->release('ostatus_process_item_insert');
-                                                               Logger::log("Item with uri ".$item["uri"]." for user ".$importer["uid"].' stored. Return value: '.$ret);
-                                                       } else {
-                                                               $ret = Item::insert($item);
-                                                               Logger::log("We couldn't lock - but tried to store the item anyway. Return value is ".$ret);
-                                                       }
+                                                       $ret = Item::insert($item);
+                                                       Logger::log("Item with uri ".$item["uri"]." for user ".$importer["uid"].' stored. Return value: '.$ret);
                                                }
                                        }
                                }
@@ -2129,7 +2122,7 @@ class OStatus
                }
 
                $check_date = DateTimeFormat::utc($last_update);
-               $authorid = Contact::getIdForURL($owner["url"], 0, false);
+               $authorid = Contact::getIdForURL($owner["url"]);
 
                $condition = ["`uid` = ? AND `received` > ? AND NOT `deleted`
                        AND `private` != ? AND `visible` AND `wall` AND `parent-network` IN (?, ?)",
@@ -2218,14 +2211,13 @@ class OStatus
         * Checks if the given contact url does support OStatus
         *
         * @param string  $url    profile url
-        * @param boolean $update Update the profile
         * @return boolean
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         * @throws \ImagickException
         */
-       public static function isSupportedByContactUrl($url, $update = false)
+       public static function isSupportedByContactUrl($url)
        {
-               $probe = Probe::uri($url, Protocol::OSTATUS, 0, !$update);
+               $probe = Probe::uri($url, Protocol::OSTATUS);
                return $probe['network'] == Protocol::OSTATUS;
        }
 }