Version 4.5.0

This commit is contained in:
Neo committed 2025-12-19 05:51:58 -08:00
1 parent 1a0c7fd3c2
commit f79dcf067a
3791 files changed
+248032 -76372

No files matched your search

+8 -4
View File
@@ -11,7 +11,7 @@
namespace IPS\core\Online;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -59,6 +59,9 @@ class _Table extends \IPS\Helpers\Table\Table
{
if ( static::$rows === NULL )
{
/* Always return an array */
static::$rows = array();
/* What are we sorting by? */
$sortDirection = ( mb_strtolower( $this->sortDirection ) == 'asc' ? 'asc' : 'desc' );
$flags = \IPS\Session\Store::ONLINE_MEMBERS | \IPS\Session\Store::ONLINE_GUESTS;
@@ -70,7 +73,7 @@ class _Table extends \IPS\Helpers\Table\Table
}
elseif ( mb_stristr( $this->filter, 'group_' ) )
{
$memberGroup = intval( $this->filters[ $this->filter ] );
$memberGroup = \intval( $this->filters[ $this->filter ] );
}
$this->count = \IPS\Session\Store::i()->getOnlineUsers( $flags | \IPS\Session\Store::ONLINE_COUNT_ONLY, $sortDirection, NULL, $memberGroup, \IPS\Member::loggedIn()->isAdmin() );
@@ -120,7 +123,8 @@ class _Table extends \IPS\Helpers\Table\Table
/* Parse if necessary (NB: deliberately do this before removing the row in case we need to do some processing, but don't want the column to actually show) */
if( isset( $this->parsers[ $k ] ) )
{
$v = call_user_func( $this->parsers[ $k ], $v, $_row );
$parserFunction = $this->parsers[ $k ];
$v = $parserFunction( $v, $_row );
}
else
{
@@ -128,7 +132,7 @@ class _Table extends \IPS\Helpers\Table\Table
}
/* Are we including this one? */
if( ( ( $this->include !== NULL and !in_array( $k, $this->include ) ) or ( $this->exclude !== NULL and in_array( $k, $this->exclude ) ) ) and !array_key_exists( $k, $advancedSearchValues ) )
if( ( ( $this->include !== NULL and !\in_array( $k, $this->include ) ) or ( $this->exclude !== NULL and \in_array( $k, $this->exclude ) ) ) and !array_key_exists( $k, $advancedSearchValues ) )
{
unset( $row[ $k ] );
continue;