{
public static function init(array $parameters = [])
{
- if (empty($parameters['profile'])) {
- return;
- }
-
Profile::load(DI::app(), $parameters['profile']);
}
{
$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();
}
if (empty($a->profile['uid'])) {
- notice(DI::l10n()->t('Profile unavailable.') . EOL);
+ notice(DI::l10n()->t('Profile unavailable.'));
return;
}
$url = trim($_POST['dfrn_url']);
if (!strlen($url)) {
- notice(DI::l10n()->t("Invalid locator") . EOL);
+ notice(DI::l10n()->t("Invalid locator"));
return;
}
{
$a = DI::app();
- if (empty($parameters['profile']) || empty($a->profile)) {
+ if (empty($a->profile)) {
return '';
}
'$request' => 'remote_follow/' . $parameters['profile'],
'$name' => $a->profile['name'],
- '$myaddr' => '', //Profile::getMyURL(),
+ '$myaddr' => Profile::getMyURL(),
]);
return $o;
}
-}
\ No newline at end of file
+}