Version 4.7.13

This commit is contained in:
Neo committed 2025-12-19 16:14:56 -08:00
1 parent fd22d99e69
commit 7124a02564
954 files changed
+29277 -59308

No files matched your search

+18 -2
View File
@@ -20,7 +20,7 @@ if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
/**
* activeUsers Widget
*/
class _activeUsers extends \IPS\Widget\StaticCache
class _activeUsers extends \IPS\Widget\PermissionCache
{
/**
* @brief Widget Key
@@ -79,9 +79,25 @@ class _activeUsers extends \IPS\Widget\StaticCache
\IPS\Output::i()->jsVars['member_hovercardUrl'] = (string) $member->url()->setQueryString( 'do', 'hovercard' );
\IPS\Output::i()->jsVars['member_formattedName'] = str_replace( '"', '\\"', \IPS\Member\Group::load( $member->member_group_id )->formatName( $member->name ) );
}
/* We want to use the user's permissions array which will validate social groups, clubs and groups. But, we need to remove the individual member entry */
$member = \IPS\Member::loggedIn() ?: new \IPS\Member;
$permissions = $member->permissionArray();
foreach( $permissions as $key => $entry )
{
if( mb_substr( $entry, 0, 1 ) === 'm' )
{
unset( $permissions[ $key ] );
break;
}
}
/* We sort to ensure the array is always in the same order */
sort( $permissions );
$theme = $member->skin ?: \IPS\Theme::defaultTheme();
$this->cacheKey = "widget_{$this->key}_" . $this->uniqueKey . '_' . md5( $this->url . '_' . json_encode( $configuration ) . "_" . $member->language()->id . "_" . $theme . "_" . $orientation . '-' . (int) \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'members', 'front' ) ) );
$this->cacheKey = "widget_{$this->key}_" . $this->uniqueKey . '_' . md5( $this->url . '_' . json_encode( $configuration ) . "_" . $member->language()->id . "_" . $theme . "_" . json_encode( $permissions ) . $orientation . '-' . (int) \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'members', 'front' ) ) );
}
}