The friendica constants have been moved to the app class

This commit is contained in:
Michael 2022-10-17 10:37:48 +00:00
parent 54951b7be6
commit 62a0d55fc8
22 changed files with 58 additions and 48 deletions

View file

@ -21,6 +21,7 @@
namespace Friendica\Module\Admin;
use Friendica\App;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
@ -202,7 +203,7 @@ class Federation extends BaseAdmin
'$page' => DI::l10n()->t('Federation Statistics'),
'$intro' => $intro,
'$counts' => $counts,
'$version' => FRIENDICA_VERSION,
'$version' => App::VERSION,
'$legendtext' => DI::l10n()->tt('Currently this node is aware of %2$s node (%3$s active users last month, %4$s active users last six months, %5$s registered users in total) from the following platforms:', 'Currently this node is aware of %2$s nodes (%3$s active users last month, %4$s active users last six months, %5$s registered users in total) from the following platforms:', $total, number_format($total), number_format($month), number_format($halfyear), number_format($users)),
]);
}

View file

@ -21,6 +21,7 @@
namespace Friendica\Module\Admin;
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Config\ValueObject\Cache;
use Friendica\Core\Logger;
@ -79,8 +80,8 @@ class Summary extends BaseAdmin
// the local version of Friendica. Check is opt-in, source may be stable or develop branch
if (DI::config()->get('system', 'check_new_version_url', 'none') != 'none') {
$gitversion = DI::config()->get('system', 'git_friendica_version');
if (version_compare(FRIENDICA_VERSION, $gitversion) < 0) {
$warningtext[] = DI::l10n()->t('There is a new version of Friendica available for download. Your current version is %1$s, upstream version is %2$s', FRIENDICA_VERSION, $gitversion);
if (version_compare(App::VERSION, $gitversion) < 0) {
$warningtext[] = DI::l10n()->t('There is a new version of Friendica available for download. Your current version is %1$s, upstream version is %2$s', App::VERSION, $gitversion);
}
}
@ -236,9 +237,9 @@ class Summary extends BaseAdmin
'$users' => [DI::l10n()->t('Registered users'), $users],
'$accounts' => $accounts,
'$pending' => [DI::l10n()->t('Pending registrations'), $pending],
'$version' => [DI::l10n()->t('Version'), FRIENDICA_VERSION],
'$platform' => FRIENDICA_PLATFORM,
'$codename' => FRIENDICA_CODENAME,
'$version' => [DI::l10n()->t('Version'), App::VERSION],
'$platform' => App::PLATFORM,
'$codename' => App::CODENAME,
'$build' => DI::config()->get('system', 'build'),
'$addons' => [DI::l10n()->t('Active addons'), Addon::getEnabledList()],
'$serversettings' => $server_settings,