Merge branch 'develop' into refactoring-of-app-class

This commit is contained in:
Art4 2024-11-16 19:29:56 +00:00
commit a24a65de2f
561 changed files with 64963 additions and 61342 deletions

View file

@ -63,7 +63,7 @@ class Index extends BaseAdmin
'$function' => 'addons',
'$addons' => $addons,
'$pcount' => count($addons),
'$noplugshint' => DI::l10n()->t('There are currently no addons available on your node. You can find the official addon repository at %1$s and might find other interesting addons in the open addon registry at %2$s', 'https://github.com/friendica/friendica-addons', 'http://addons.friendi.ca'),
'$noplugshint' => DI::l10n()->t('There are currently no addons available on your node. You can find the official addon repository at %1$s.', 'https://git.friendi.ca/friendica/friendica-addons'),
'$form_security_token' => self::getFormSecurityToken('admin_addons'),
]);
}

View file

@ -8,6 +8,7 @@
namespace Friendica\Module\Admin;
use Friendica\App;
use Friendica\Content\ContactSelector;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
@ -36,6 +37,7 @@ class Federation extends BaseAdmin
'foundkey' => ['name' => 'Foundkey', 'color' => '#609926'], // Some random color from the repository
'funkwhale' => ['name' => 'Funkwhale', 'color' => '#4082B4'], // From the homepage
'gancio' => ['name' => 'Gancio', 'color' => '#7253ed'], // Fontcolor from the page
'glitchsoc' => ['name' => 'Mastodon Glitch Edition', 'color' => '#82dcb9'], // Color from their site
'gnusocial' => ['name' => 'GNU Social/Statusnet', 'color' => '#a22430'], // dark red from the logo
'gotosocial' => ['name' => 'GoToSocial', 'color' => '#df8958'], // Some color from their mascot
'hometown' => ['name' => 'Hometown', 'color' => '#1f70c1'], // Color from the Patreon page
@ -128,6 +130,10 @@ class Federation extends BaseAdmin
$platform = 'nomad';
} elseif(stristr($platform, 'pleroma')) {
$platform = 'pleroma';
} elseif(stristr($platform, 'glitchsoc')) {
$platform = 'glitchsoc';
} elseif(stristr($platform, 'iceshrimp.net')) {
$platform = 'iceshrimp';
} elseif(stristr($platform, 'statusnet')) {
$platform = 'gnusocial';
} elseif(stristr($platform, 'nextcloud')) {
@ -176,6 +182,7 @@ class Federation extends BaseAdmin
}
$gserver['platform'] = $systems[$platform]['name'];
$gserver['svg'] = ContactSelector::networkToSVG($gserver['network'], null, $platform, DI::userSession()->getLocalUserId());
$gserver['totallbl'] = DI::l10n()->tt('%2$s total system' , '%2$s total systems' , $gserver['total'], number_format($gserver['total']));
$gserver['monthlbl'] = DI::l10n()->tt('%2$s active user last month' , '%2$s active users last month' , $gserver['month'] ?? 0, number_format($gserver['month'] ?? 0));
$gserver['halfyearlbl'] = DI::l10n()->tt('%2$s active user last six months' , '%2$s active users last six months' , $gserver['halfyear'] ?? 0, number_format($gserver['halfyear'] ?? 0));

View file

@ -64,23 +64,19 @@ class Summary extends BaseAdmin
// Check if github.com/friendica/stable/VERSION is higher then
// 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::keyValue()->get('git_friendica_version') ?? '';
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);
}
if (Update::isAvailable()) {
$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, Update::getAvailableVersion());
}
if (DI::config()->get('system', 'dbupdate', DBStructure::UPDATE_NOT_CHECKED) == DBStructure::UPDATE_NOT_CHECKED) {
if (DBStructure::getUpdateStatus() == DBStructure::UPDATE_NOT_CHECKED) {
DBStructure::performUpdate();
}
if (DI::config()->get('system', 'dbupdate') == DBStructure::UPDATE_FAILED) {
if (DBStructure::getUpdateStatus() == DBStructure::UPDATE_FAILED) {
$warningtext[] = DI::l10n()->t('The database update failed. Please run "php bin/console.php dbstructure update" from the command line and have a look at the errors that might appear.');
}
if (DI::config()->get('system', 'update') == Update::FAILED) {
if (Update::getStatus() == Update::FAILED) {
$warningtext[] = DI::l10n()->t('The last update failed. Please run "php bin/console.php dbstructure update" from the command line and have a look at the errors that might appear. (Some of the errors are possibly inside the logfile.)');
}
@ -160,9 +156,6 @@ class Summary extends BaseAdmin
// We can do better, but this is a quick queue status
$queues = ['label' => DI::l10n()->t('Message queues'), 'deferred' => $deferred, 'workerq' => $workerqueue];
$variables = DBA::toArray(DBA::p('SHOW variables LIKE "max_allowed_packet"'));
$max_allowed_packet = $variables ? $variables[0]['Value'] : 0;
$server_settings = [
'label' => DI::l10n()->t('Server Settings'),
'php' => [
@ -173,7 +166,7 @@ class Summary extends BaseAdmin
'memory_limit' => ini_get('memory_limit')
],
'mysql' => [
'max_allowed_packet' => $max_allowed_packet
'max_allowed_packet' => DBA::getVariable('max_allowed_packet'),
]
];