Merge pull request #851 from MrPetovan/task/remove-friendica-app-support

[various] Remove /display/{nick}/{id} URL structure publishing
This commit is contained in:
Michael Vogel 2019-05-06 08:03:16 +02:00 committed by GitHub
commit 25b748f9ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -254,7 +254,7 @@ function mailstream_subject($item) {
return L10n::t("Friendica Item"); return L10n::t("Friendica Item");
} }
function mailstream_send($a, $message_id, $item, $user) { function mailstream_send(\Friendica\App $a, $message_id, $item, $user) {
if (!$item['visible']) { if (!$item['visible']) {
return; return;
} }
@ -293,7 +293,7 @@ function mailstream_send($a, $message_id, $item, $user) {
$mail->CharSet = 'utf-8'; $mail->CharSet = 'utf-8';
$template = Renderer::getMarkupTemplate('mail.tpl', 'addon/mailstream/'); $template = Renderer::getMarkupTemplate('mail.tpl', 'addon/mailstream/');
$item['body'] = BBCode::convert($item['body']); $item['body'] = BBCode::convert($item['body']);
$item['url'] = $a->getBaseURL() . '/display/' . $user['nickname'] . '/' . $item['id']; $item['url'] = $a->getBaseURL() . '/display/' . $item['guid'];
$mail->Body = Renderer::replaceMacros($template, [ $mail->Body = Renderer::replaceMacros($template, [
'$upstream' => L10n::t('Upstream'), '$upstream' => L10n::t('Upstream'),
'$local' => L10n::t('Local'), '$local' => L10n::t('Local'),

View File

@ -735,7 +735,7 @@ function statusnet_prepare_body(App $a, &$b)
} }
$item = $b["item"]; $item = $b["item"];
$item["plink"] = $a->getBaseURL() . "/display/" . $a->user["nickname"] . "/" . $item["parent"]; $item["plink"] = $a->getBaseURL() . "/display/" . $item["guid"];
$condition = ['uri' => $item["thr-parent"], 'uid' => local_user()]; $condition = ['uri' => $item["thr-parent"], 'uid' => local_user()];
$orig_post = Item::selectFirst(['author-link', 'uri'], $condition); $orig_post = Item::selectFirst(['author-link', 'uri'], $condition);

View File

@ -814,7 +814,7 @@ function twitter_prepare_body(App $a, array &$b)
if ($b["preview"]) { if ($b["preview"]) {
$max_char = 280; $max_char = 280;
$item = $b["item"]; $item = $b["item"];
$item["plink"] = $a->getBaseURL() . "/display/" . $a->user["nickname"] . "/" . $item["parent"]; $item["plink"] = $a->getBaseURL() . "/display/" . $item["guid"];
$condition = ['uri' => $item["thr-parent"], 'uid' => local_user()]; $condition = ['uri' => $item["thr-parent"], 'uid' => local_user()];
$orig_post = Item::selectFirst(['author-link'], $condition); $orig_post = Item::selectFirst(['author-link'], $condition);