The boot.php had been cleared of most functions

This commit is contained in:
Michael 2021-11-04 20:29:59 +00:00
parent 4989d1fa99
commit 63da4a75e9
37 changed files with 279 additions and 401 deletions

View file

@ -223,12 +223,12 @@ class Conversation
break;
}
} elseif ($total > 1) {
if ($total < MAX_LIKERS) {
if ($total < $this->config->get('system', 'max_likers')) {
$likers = implode(', ', array_slice($links, 0, -1));
$likers .= ' ' . $this->l10n->t('and') . ' ' . $links[count($links) - 1];
} else {
$likers = implode(', ', array_slice($links, 0, MAX_LIKERS - 1));
$likers .= ' ' . $this->l10n->t('and %d other people', $total - MAX_LIKERS);
$likers = implode(', ', array_slice($links, 0, $this->config->get('system', 'max_likers') - 1));
$likers .= ' ' . $this->l10n->t('and %d other people', $total - $this->config->get('system', 'max_likers'));
}
$spanatts = "class=\"fakelink\" onclick=\"openClose('{$verb}list-$id');\"";

View file

@ -295,7 +295,7 @@ class Nav
}
// Show the link to the admin configuration page if user is admin
if (is_site_admin()) {
if ($a->isSiteAdmin()) {
$nav['admin'] = ['admin/', DI::l10n()->t('Admin'), '', DI::l10n()->t('Site setup and configuration')];
}

View file

@ -63,7 +63,7 @@ class Widget
if (DI::config()->get('system', 'invitation_only')) {
$x = intval(DI::pConfig()->get(local_user(), 'system', 'invites_remaining'));
if ($x || is_site_admin()) {
if ($x || DI::app()->isSiteAdmin()) {
DI::page()['aside'] .= '<div class="side-link widget" id="side-invite-remain">'
. DI::l10n()->tt('%d invitation available', '%d invitations available', $x)
. '</div>';