Use central function to fetch the global directory

This commit is contained in:
Michael 2022-04-26 18:33:58 +00:00
parent 478ee7b6fc
commit 171354181d
13 changed files with 24 additions and 14 deletions

View file

@ -23,6 +23,7 @@ namespace Friendica\Module;
use Friendica\BaseModule;
use Friendica\Core\Renderer;
use Friendica\Core\Search;
use Friendica\DI;
use Friendica\Model;
use Friendica\Model\User;
@ -143,7 +144,7 @@ class Invite extends BaseModule
}
}
$dirLocation = $config->get('system', 'directory');
$dirLocation = Search::getGlobalDirectory();
if (strlen($dirLocation)) {
if ($config->get('config', 'register_policy') === Register::CLOSED) {
$linkTxt = DI::l10n()->t('Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks.', $dirLocation . '/servers');