Version 5.0.0 beta 2

This commit is contained in:
Neo committed 2025-12-19 16:39:01 -08:00
1 parent 15c7beabc5
commit f61b0da85d
181 files changed
+3182 -1533

No files matched your search

+15 -6
View File
@@ -104,12 +104,16 @@ class Rules extends Model
$form->add( new Number( 'automaticmoderation_points', $this->id ? $this->points_needed : 10, TRUE, array( 'min' => 1, 'max' => 9999 ), NULL, NULL, Member::loggedIn()->language()->addToStack('automaticmoderation_points_suffix') ) );
$options = array();
foreach(Types::roots() as $type )
if( count( Types::roots() ) > 0 )
{
$options[ $type->id ] = $type->_title;
foreach(Types::roots() as $type )
{
$options[ $type->id ] = $type->_title;
}
$form->add( new CheckboxSet( 'automaticmoderation_type', $this->types ? explode( ',', $this->types ) : array(), TRUE, array( 'options' => $options ) ) );
}
$form->add( new CheckboxSet( 'automaticmoderation_type', $this->types ? explode( ',', $this->types ) : array(), TRUE, array( 'options' => $options ) ) );
/* Loop over our member filters */
$form->addHeader( 'automaticmoderation_generic_filters' );
@@ -201,7 +205,11 @@ class Rules extends Model
$values['rule_filters'] = json_encode( $_options );
$values['rule_points_needed'] = $values['automaticmoderation_points'];
$values['rule_enabled'] = $values['automaticmoderation_enabled'];
$values['rule_types'] = $values['automaticmoderation_type'];
if( isset( $values['automaticmoderation_type'] ) )
{
$values['rule_types'] = $values['automaticmoderation_type'];
}
/* Now we have to remove any fields that aren't valid... */
foreach( $values as $k => $v )
@@ -378,10 +386,11 @@ class Rules extends Model
/* Loop over the filters */
$descriptions = array();
foreach( $this->_filters as $key => $filter )
if( $this->_filters )
{
if( isset( static::$extensions[ $key ] ) )
foreach( $this->_filters as $key => $filter )
{
if( isset( static::$extensions[ $key ] ) )
/* Ask the extension if this member matches the defined rule...if not, just return FALSE now */
if( method_exists( static::$extensions[ $key ], 'getDescription' ) and $description = static::$extensions[ $key ]->getDescription( $filter ) )
{