Version 4.1.2

This commit is contained in:
Neo committed 2025-12-19 05:32:19 -08:00
1 parent 3ba79295ee
commit 28bd025b35
1131 files changed
+63658 -20579

No files matched your search

@@ -96,15 +96,16 @@ class _Advertisement extends \IPS\Patterns\ActiveRecord
}
}
/* Weed out any we don't see due to our group. This is done after loading the advertisements so that the cache can be properly primed regardless of group. */
/* Weed out any we don't see due to our group. This is done after loading the advertisements so that the cache can be properly primed regardless of group. Note that $ad->exempt, is, confusingly who to SHOW to, not who is exempt */
foreach( static::$advertisements as $adLocation => $ads )
{
foreach( $ads as $index => $ad )
{
if ( $ad->exempt != '*' )
{
$groupsToHideFrom = array_diff( array_keys(\IPS\Member\Group::groups()), json_decode( $ad->exempt, TRUE ) );
if ( \IPS\Member::loggedIn()->inGroup( $groupsToHideFrom ) )
{
unset( static::$advertisements[ $adLocation ][ $index ] );