Removed unneeded stuff

This commit is contained in:
Michael 2020-02-09 22:08:59 +00:00
parent 2eebeeaa32
commit e628d2726b

View file

@ -19,10 +19,6 @@ class RemoteFollow extends BaseModule
{ {
public static function init(array $parameters = []) public static function init(array $parameters = [])
{ {
if (empty($parameters['profile'])) {
return;
}
Profile::load(DI::app(), $parameters['profile']); Profile::load(DI::app(), $parameters['profile']);
} }
@ -30,18 +26,18 @@ class RemoteFollow extends BaseModule
{ {
$a = DI::app(); $a = DI::app();
if (empty($parameters['profile']) || !empty($_POST['cancel']) || empty($_POST['dfrn_url'])) { if (!empty($_POST['cancel']) || empty($_POST['dfrn_url'])) {
DI::baseUrl()->redirect(); DI::baseUrl()->redirect();
} }
if (empty($a->profile['uid'])) { if (empty($a->profile['uid'])) {
notice(DI::l10n()->t('Profile unavailable.') . EOL); notice(DI::l10n()->t('Profile unavailable.'));
return; return;
} }
$url = trim($_POST['dfrn_url']); $url = trim($_POST['dfrn_url']);
if (!strlen($url)) { if (!strlen($url)) {
notice(DI::l10n()->t("Invalid locator") . EOL); notice(DI::l10n()->t("Invalid locator"));
return; return;
} }
@ -79,7 +75,7 @@ class RemoteFollow extends BaseModule
{ {
$a = DI::app(); $a = DI::app();
if (empty($parameters['profile']) || empty($a->profile)) { if (empty($a->profile)) {
return ''; return '';
} }
@ -98,7 +94,7 @@ class RemoteFollow extends BaseModule
'$request' => 'remote_follow/' . $parameters['profile'], '$request' => 'remote_follow/' . $parameters['profile'],
'$name' => $a->profile['name'], '$name' => $a->profile['name'],
'$myaddr' => '', //Profile::getMyURL(), '$myaddr' => Profile::getMyURL(),
]); ]);
return $o; return $o;
} }