Skip to content
Snippets Groups Projects
Commit f45178e5 authored by Elmar Ludwig's avatar Elmar Ludwig
Browse files

drop login_info div with stats from start page, fixes #3390

Closes #3390

Merge request studip/studip!2309
parent caa0ddef
No related branches found
No related tags found
No related merge requests found
...@@ -95,19 +95,10 @@ foreach ($portalplugins as $portalplugin) { ...@@ -95,19 +95,10 @@ foreach ($portalplugins as $portalplugin) {
$index_nobody_template = $GLOBALS['template_factory']->open('index_nobody'); $index_nobody_template = $GLOBALS['template_factory']->open('index_nobody');
$cache = StudipCacheFactory::getCache(); $index_nobody_template->set_attributes([
$stat = $cache->read('LOGINFORM_STATISTICS');
if (!is_array($stat)) {
$stat = [];
$stat['num_active_courses'] = Course::countBySQL();
$stat['num_registered_users'] = User::countBySQL();
$cache->write('LOGINFORM_STATISTICS', $stat, 3600);
}
$index_nobody_template->set_attributes(array_merge($stat, [
'num_online_users' => get_users_online_count(),
'plugin_contents' => $plugin_contents, 'plugin_contents' => $plugin_contents,
'logout' => Request::bool('logout'), 'logout' => Request::bool('logout'),
])); ]);
echo $index_nobody_template->render(); echo $index_nobody_template->render();
......
<?php <?php
/** /**
* @var int $num_active_courses
* @var int $num_registered_users
* @var int $num_online_users
* @var bool $logout * @var bool $logout
* @var string[] $plugin_contents * @var string[] $plugin_contents
*/ */
...@@ -85,29 +82,6 @@ if ($bg_mobile) { ...@@ -85,29 +82,6 @@ if ($bg_mobile) {
<? endif ?> <? endif ?>
</div> </div>
<div class="login_info">
<div>
<?= _('Aktive Veranstaltungen') ?>:
<?= number_format($num_active_courses, 0, ',', '.') ?>
</div>
<div>
<?= _('Registrierte NutzerInnen') ?>:
<?= number_format($num_registered_users, 0, ',', '.') ?>
</div>
<div>
<?= _('Davon online') ?>:
<?= number_format($num_online_users, 0, ',', '.') ?>
</div>
<div>
<a href="dispatch.php/siteinfo/show">
<?= _('mehr') ?> &hellip;
</a>
</div>
</div>
</footer> </footer>
</article> </article>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment