mirror of
https://github.com/friendica/friendica
synced 2025-04-23 19:50:11 +00:00
Merge remote-tracking branch 'upstream/develop' into audience
This commit is contained in:
commit
69e4254dcc
51 changed files with 656 additions and 573 deletions
|
@ -97,6 +97,8 @@ class BaseSearch extends BaseModule
|
|||
} elseif (Search::getGlobalDirectory() && empty($results)) {
|
||||
$results = Search::getContactsFromGlobalDirectory($search, $type, $pager->getPage());
|
||||
$pager->setItemsPerPage($results->getItemsPage());
|
||||
} else {
|
||||
$results = new ResultList();
|
||||
}
|
||||
|
||||
return self::printResult($results, $pager, $header);
|
||||
|
@ -120,11 +122,17 @@ class BaseSearch extends BaseModule
|
|||
return '';
|
||||
}
|
||||
|
||||
$filtered = 0;
|
||||
|
||||
$entries = [];
|
||||
foreach ($results->getResults() as $result) {
|
||||
|
||||
// in case the result is a contact result, add a contact-specific entry
|
||||
if ($result instanceof ContactResult) {
|
||||
if (Network::isUriBlocked($result->getUrl())) {
|
||||
$filtered++;
|
||||
continue;
|
||||
}
|
||||
|
||||
$contact = Model\Contact::getByURLForUser($result->getUrl(), DI::userSession()->getLocalUserId());
|
||||
if (!empty($contact)) {
|
||||
$entries[] = Contact::getContactTemplateVars($contact);
|
||||
|
@ -134,7 +142,11 @@ class BaseSearch extends BaseModule
|
|||
|
||||
$tpl = Renderer::getMarkupTemplate('contact/list.tpl');
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'title' => $header,
|
||||
'$title' => $header,
|
||||
'$filtered' => $filtered ? DI::l10n()->tt(
|
||||
'%d result was filtered out because your node blocks the domain it is registered on. You can review the list of domains your node is currently blocking in the <a href="/friendica">About page</a>.',
|
||||
'%d results were filtered out because your node blocks the domain they are registered on. You can review the list of domains your node is currently blocking in the <a href="/friendica">About page</a>.',
|
||||
$filtered) : '',
|
||||
'$contacts' => $entries,
|
||||
'$paginate' => $pager->renderFull($results->getTotal()),
|
||||
]);
|
||||
|
|
|
@ -343,7 +343,7 @@ class Install extends BaseModule
|
|||
*/
|
||||
private function whatNext(): string
|
||||
{
|
||||
$baseurl = $this->baseUrl;
|
||||
$baseurl = (string)$this->baseUrl;
|
||||
return
|
||||
$this->t('<h1>What next</h1>')
|
||||
. "<p>" . $this->t('IMPORTANT: You will need to [manually] setup a scheduled task for the worker.')
|
||||
|
|
|
@ -68,7 +68,7 @@ class Share extends \Friendica\BaseModule
|
|||
$shared = $this->contentItem->getSharedPost($item, ['uri']);
|
||||
if ($shared && empty($shared['comment'])) {
|
||||
$content = '[share]' . $shared['post']['uri'] . '[/share]';
|
||||
} elseif ($item['network'] == Protocol::FEED) {
|
||||
} elseif (!empty($item['plink']) && !in_array($item['network'], Protocol::FEDERATED)) {
|
||||
$content = '[attachment]' . $item['plink'] . '[/attachment]';
|
||||
} else {
|
||||
$content = '[share]' . $item['uri'] . '[/share]';
|
||||
|
|
|
@ -232,7 +232,7 @@ class Import extends \Friendica\BaseModule
|
|||
}
|
||||
|
||||
$oldBaseUrl = $account['baseurl'];
|
||||
$newBaseUrl = $this->baseUrl;
|
||||
$newBaseUrl = (string)$this->baseUrl;
|
||||
|
||||
$oldAddr = str_replace('http://', '@', Strings::normaliseLink($oldBaseUrl));
|
||||
$newAddr = str_replace('http://', '@', Strings::normaliseLink($newBaseUrl));
|
||||
|
|
|
@ -105,7 +105,7 @@ class Xrd extends BaseModule
|
|||
|
||||
private function printSystemJSON(array $owner)
|
||||
{
|
||||
$baseURL = $this->baseUrl;
|
||||
$baseURL = (string)$this->baseUrl;
|
||||
$json = [
|
||||
'subject' => 'acct:' . $owner['addr'],
|
||||
'aliases' => [$owner['url']],
|
||||
|
@ -151,7 +151,7 @@ class Xrd extends BaseModule
|
|||
|
||||
private function printJSON(string $alias, array $owner, array $avatar)
|
||||
{
|
||||
$baseURL = $this->baseUrl;
|
||||
$baseURL = (string)$this->baseUrl;
|
||||
|
||||
$json = [
|
||||
'subject' => 'acct:' . $owner['addr'],
|
||||
|
@ -228,7 +228,7 @@ class Xrd extends BaseModule
|
|||
|
||||
private function printXML(string $alias, array $owner, array $avatar)
|
||||
{
|
||||
$baseURL = $this->baseUrl;
|
||||
$baseURL = (string)$this->baseUrl;
|
||||
|
||||
$xmlString = XML::fromArray([
|
||||
'XRD' => [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue