1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-11 17:14:42 +02:00

Closes #3723 - Hide users that have not logged in yet from lastseen menu

This commit is contained in:
Moc
2021-12-21 10:35:59 +01:00
parent 484ef69dd3
commit de8af179a4

View File

@@ -6,12 +6,6 @@
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/online/lastseen_menu.php,v $
* $Revision$
* $Date$
* $Author$
*/
if(!defined('e107_INIT'))
@@ -27,24 +21,22 @@ if(THEME_LEGACY !== true)
}
else
{
if(is_readable(THEME . 'online_menu_template.php'))
if(is_readable(THEME.'online_menu_template.php'))
{
require(THEME . 'online_menu_template.php');
require(THEME.'online_menu_template.php');
}
else
{
require(e_PLUGIN . 'online/templates/online_menu_template.php');
require(e_PLUGIN.'online/templates/online_menu_template.php');
$LASTSEEN_TEMPLATE = $ONLINE_MENU_TEMPLATE['lastseen'];
}
}
$menu_pref = e107::getConfig('menu')->getPref();
$tp = e107::getParser();
$num = intval(vartrue($menu_pref['online_ls_amount'], 10));
$sql->select('user', 'user_id, user_name, user_currentvisit', 'ORDER BY user_currentvisit DESC LIMIT 0,' . $num, 'nowhere');
$sql->select("user", "user_id, user_name, user_currentvisit", "user_currentvisit != '0' ORDER BY user_currentvisit DESC LIMIT 0,".$num);
$lslist = $sql->db_getList();
$text = $tp->parseTemplate($LASTSEEN_TEMPLATE['start'], true);
@@ -61,4 +53,3 @@ $text .= $tp->parseTemplate($LASTSEEN_TEMPLATE['end'], true, $online_shortcodes)
$caption = vartrue($menu_pref['online_ls_caption'], LAN_LASTSEEN_1);
e107::getRender()->tablerender($caption, $text, 'lastseen');