X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FRemoteFollow.php;h=130c76319c12b43c073d3fd7bcd9971a0f5e6825;hb=c55c42b303846c63841ce982ef485fac9904d0da;hp=171ea553095646e7bcfcea0f708996252f72f56d;hpb=04a0cd930182cb8f068327d7eb92ce372d45d564;p=friendica.git
diff --git a/src/Module/RemoteFollow.php b/src/Module/RemoteFollow.php
index 171ea55309..130c76319c 100644
--- a/src/Module/RemoteFollow.php
+++ b/src/Module/RemoteFollow.php
@@ -1,6 +1,6 @@
owner = User::getOwnerDataByNick($this->parameters['profile']);
if (!$this->owner) {
- throw new HTTPException\NotFoundException($this->l10n->t('User not found.'));
+ throw new HTTPException\NotFoundException($this->t('User not found.'));
}
- $this->baseUrl = $baseUrl;
$this->page = $page;
}
- public function post()
+ protected function post(array $request = [])
{
if (!empty($_POST['cancel']) || empty($_POST['dfrn_url'])) {
$this->baseUrl->redirect();
}
if (empty($this->owner)) {
- notice($this->l10n->t('Profile unavailable.'));
+ notice($this->t('Profile unavailable.'));
return;
}
$url = Probe::cleanURI($_POST['dfrn_url']);
if (!strlen($url)) {
- notice($this->l10n->t("Invalid locator"));
+ notice($this->t("Invalid locator"));
return;
}
// Detect the network, make sure the provided URL is valid
$data = Contact::getByURL($url);
if (!$data) {
- notice($this->l10n->t("The provided profile link doesn't seem to be valid"));
+ notice($this->t("The provided profile link doesn't seem to be valid"));
return;
}
if (empty($data['subscribe'])) {
- notice($this->l10n->t("Remote subscription can't be done for your network. Please subscribe directly on your system."));
+ notice($this->t("Remote subscription can't be done for your network. Please subscribe directly on your system."));
return;
}
@@ -106,7 +105,7 @@ class RemoteFollow extends BaseModule
System::externalRedirect($follow_link);
}
- public function content(): string
+ protected function content(array $request = []): string
{
if (empty($this->owner)) {
return '';
@@ -119,13 +118,13 @@ class RemoteFollow extends BaseModule
$tpl = Renderer::getMarkupTemplate('auto_request.tpl');
$o = Renderer::replaceMacros($tpl, [
- '$header' => $this->l10n->t('Friend/Connection Request'),
- '$page_desc' => $this->l10n->t('Enter your Webfinger address (user@domain.tld) or profile URL here. If this isn\'t supported by your system, you have to subscribe to %s or %s directly on your system.', $target_addr, $target_url),
- '$invite_desc' => $this->l10n->t('If you are not yet a member of the free social web, follow this link to find a public Friendica node and join us today.', Search::getGlobalDirectory() . '/servers'),
- '$your_address' => $this->l10n->t('Your Webfinger address or profile URL:'),
- '$pls_answer' => $this->l10n->t('Please answer the following:'),
- '$submit' => $this->l10n->t('Submit Request'),
- '$cancel' => $this->l10n->t('Cancel'),
+ '$header' => $this->t('Friend/Connection Request'),
+ '$page_desc' => $this->t('Enter your Webfinger address (user@domain.tld) or profile URL here. If this isn\'t supported by your system, you have to subscribe to %s or %s directly on your system.', $target_addr, $target_url),
+ '$invite_desc' => $this->t('If you are not yet a member of the free social web, follow this link to find a public Friendica node and join us today.', Search::getGlobalDirectory() . '/servers'),
+ '$your_address' => $this->t('Your Webfinger address or profile URL:'),
+ '$pls_answer' => $this->t('Please answer the following:'),
+ '$submit' => $this->t('Submit Request'),
+ '$cancel' => $this->t('Cancel'),
'$request' => 'remote_follow/' . $this->parameters['profile'],
'$name' => $this->owner['name'],