Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

+43 -37
View File
@@ -368,10 +368,13 @@ class _Stream extends \IPS\Node\Model
foreach ( \IPS\Content::routedClasses( TRUE, FALSE, TRUE ) as $class )
{
$classes[ $class ] = $class::$title . '_pl';
if ( isset( $class::$containerNodeClass ) )
if ( isset( $class::$databaseColumnMap['date'] ) )
{
$classToggles[ $class ][] = 'stream_containers_' . $class::$title;
$classes[ $class ] = $class::$title . '_pl';
if ( isset( $class::$containerNodeClass ) )
{
$classToggles[ $class ][] = 'stream_containers_' . $class::$title;
}
}
}
@@ -390,7 +393,7 @@ class _Stream extends \IPS\Node\Model
$nodeClass = $class::$containerNodeClass;
$value = isset( $containers->$class ) ? $containers->$class : 0;
$field = new \IPS\Helpers\Form\Node( 'stream_containers_' . $class::$title, $value, FALSE, array( 'class' => $nodeClass, 'multiple' => TRUE, 'zeroVal' => 'all', 'permissionCheck' => $nodeClass::searchableNodesPermission(), 'forceOwner' => FALSE ), NULL, NULL, NULL, 'stream_containers_' . $class::$title );
$field = new \IPS\Helpers\Form\Node( 'stream_containers_' . $class::$title, $value, FALSE, array( 'class' => $nodeClass, 'multiple' => TRUE, 'zeroVal' => 'all', 'permissionCheck' => $nodeClass::searchableNodesPermission(), 'forceOwner' => FALSE, 'subnodes' => FALSE ), NULL, NULL, NULL, 'stream_containers_' . $class::$title );
$field->label = \IPS\Member::loggedIn()->language()->addToStack( $nodeClass::$nodeTitle );
$form->add( $field );
}
@@ -398,39 +401,42 @@ class _Stream extends \IPS\Node\Model
}
/* Clubs */
$clubs = \IPS\Member\Club::clubs( NULL, NULL, 'name', FALSE, array(), \IPS\Settings::i()->clubs_require_approval ? array( 'approved=1' ) : NULL );
if ( count( $clubs ) )
if( \IPS\Settings::i()->clubs )
{
$clubOptions = array();
foreach ( $clubs as $club )
$clubs = \IPS\Member\Club::clubs( NULL, NULL, 'name', FALSE, array(), \IPS\Settings::i()->clubs_require_approval ? array( 'approved=1' ) : NULL );
if ( is_object( $clubs ) AND $clubs->count( TRUE ) )
{
$clubOptions[ "c{$club->id}" ] = $club->name;
$clubOptions = array();
foreach ( $clubs as $club )
{
$clubOptions[ "c{$club->id}" ] = $club->name;
}
switch ( $this->clubs )
{
case NULL:
$clubSelect = 'all';
break;
case '0':
$clubSelect = 'none';
break;
default:
$clubSelect = 'select';
break;
}
$form->add( new \IPS\Helpers\Form\Radio( 'stream_club_select', $clubSelect, TRUE, array(
'options' => array(
'all' => 'stream_club_select_all',
'none' => 'stream_club_select_none',
'select' => 'stream_club_select_select',
),
'toggles' => array(
'select' => array( 'stream_club_filter' )
)
), NULL, NULL, NULL, 'stream_club_select' ) );
$form->add( new \IPS\Helpers\Form\Select( 'stream_club_filter', explode( ',', $this->clubs ), FALSE, array( 'options' => $clubOptions, 'parse' => 'normal', 'multiple' => TRUE, 'noDefault' => TRUE ), NULL, NULL, NULL, 'stream_club_filter' ) );
}
switch ( $this->clubs )
{
case NULL:
$clubSelect = 'all';
break;
case '0':
$clubSelect = 'none';
break;
default:
$clubSelect = 'select';
break;
}
$form->add( new \IPS\Helpers\Form\Radio( 'stream_club_select', $clubSelect, TRUE, array(
'options' => array(
'all' => 'stream_club_select_all',
'none' => 'stream_club_select_none',
'select' => 'stream_club_select_select',
),
'toggles' => array(
'select' => array( 'stream_club_filter' )
)
), NULL, NULL, NULL, 'stream_club_select' ) );
$form->add( new \IPS\Helpers\Form\Select( 'stream_club_filter', explode( ',', $this->clubs ), FALSE, array( 'options' => $clubOptions, 'parse' => 'none', 'multiple' => TRUE, 'noDefault' => TRUE ), NULL, NULL, NULL, 'stream_club_filter' ) );
}
/* Tags */
@@ -445,7 +451,7 @@ class _Stream extends \IPS\Node\Model
'custom' => array( 'stream_tags' )
)
) ) );
$form->add( new \IPS\Helpers\Form\Text( 'stream_tags', $this->tags ? explode( ',', $this->tags ) : NULL, NULL, array( 'autocomplete' => true ), NULL, NULL, NULL, 'stream_tags' ) );
$form->add( new \IPS\Helpers\Form\Text( 'stream_tags', $this->tags ? explode( ',', $this->tags ) : NULL, NULL, array( 'autocomplete' => array( 'minimized' => FALSE ) ), NULL, NULL, NULL, 'stream_tags' ) );
}
/* Ownership */
@@ -1213,11 +1219,11 @@ class _Stream extends \IPS\Node\Model
{
if ( $this->sort === 'oldest' )
{
$query->setOrder( \IPS\Content\Search\Query::ORDER_OLDEST_UPDATED );
$query->setOrder( \IPS\Content\Search\Query::ORDER_OLDEST_CREATED );
}
else
{
$query->setOrder( \IPS\Content\Search\Query::ORDER_NEWEST_UPDATED );
$query->setOrder( \IPS\Content\Search\Query::ORDER_NEWEST_COMMENTED );
}
}