Version 4.7.0
This commit is contained in:
1 parent
517a5e1f70
commit
8ba7d43898
1933 files changed
+65613
-11332
No files matched your search
@@ -95,7 +95,7 @@ class _GroupPromotion extends \IPS\Node\Model
|
||||
|
||||
foreach ( \IPS\Application::allExtensions( 'core', 'MemberFilter', TRUE, 'core' ) as $key => $extension )
|
||||
{
|
||||
if( method_exists( $extension, 'getSettingField' ) AND $extension->availableIn( 'group_promotions' ) )
|
||||
if( method_exists( $extension, 'getSettingField' ) AND $extension->availableIn( 'group_promotions' ) AND method_exists( $extension, 'matches' ) )
|
||||
{
|
||||
/* See if we need a new form header - one per app */
|
||||
$_key = explode( '_', $key );
|
||||
@@ -304,11 +304,17 @@ class _GroupPromotion extends \IPS\Node\Model
|
||||
static::$extensions = \IPS\Application::allExtensions( 'core', 'MemberFilter', TRUE, 'core' );
|
||||
}
|
||||
|
||||
/* Did we check any matches? - It's possible that some rules are available */
|
||||
$matchMethodExists = FALSE;
|
||||
|
||||
/* Loop over the filters */
|
||||
foreach( $this->_filters as $key => $filter )
|
||||
{
|
||||
if( isset( static::$extensions[ $key ] ) )
|
||||
if( isset( static::$extensions[ $key ] ) AND static::$extensions[ $key ]->availableIn( 'group_promotions' ) AND method_exists( static::$extensions[ $key ], 'matches' ) )
|
||||
{
|
||||
/* Yes the rule had a match method */
|
||||
$matchMethodExists = TRUE;
|
||||
|
||||
/* Ask the extension if this member matches the defined rule...if not, just return FALSE now */
|
||||
if( !static::$extensions[ $key ]->matches( $member, $filter, $this ) )
|
||||
{
|
||||
@@ -317,8 +323,8 @@ class _GroupPromotion extends \IPS\Node\Model
|
||||
}
|
||||
}
|
||||
|
||||
/* If we are still here, then the rule matched */
|
||||
return TRUE;
|
||||
/* If we are still here, then the rule matched unless we didn't find any matches methods */
|
||||
return $matchMethodExists;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user