1
0
Fork 0

Remove dependency to App in Contact::createFromProbe

- Address https://github.com/friendica/friendica/issues/8473#issuecomment-641259906
This commit is contained in:
Hypolite Petovan 2020-06-10 10:36:42 -04:00
commit a5a7855d39
7 changed files with 32 additions and 33 deletions

View file

@ -40,7 +40,6 @@ function follow_post(App $a)
DI::baseUrl()->redirect('contact');
}
$uid = local_user();
$url = Probe::cleanURI($_REQUEST['url']);
$return_path = 'follow?url=' . urlencode($url);
@ -48,7 +47,7 @@ function follow_post(App $a)
// This is just a precaution if maybe this page is called somewhere directly via POST
$_SESSION['fastlane'] = $url;
$result = Contact::createFromProbe($uid, $url, true);
$result = Contact::createFromProbe($a->user, $url, true);
if ($result['success'] == false) {
// Possibly it is a remote item and not an account