Version 4.3.6

This commit is contained in:
Neo committed 2025-12-19 05:49:12 -08:00
1 parent fe1acf984a
commit 1a0c7fd3c2
609 files changed
+14707 -5726

No files matched your search

+4 -9
View File
@@ -171,11 +171,6 @@ class _Blog extends \IPS\Node\Model implements \IPS\Node\Ratings, \IPS\Content\E
if ( $club = $this->club() )
{
if ( !$member->member_id )
{
return FALSE;
}
switch ( $permission )
{
case 'add':
@@ -249,7 +244,7 @@ class _Blog extends \IPS\Node\Model implements \IPS\Node\Ratings, \IPS\Content\E
if ( $club = $this->club() )
{
if ( $club->type == $club::TYPE_PUBLIC or $club->type == $club::TYPE_READONLY )
if ( $club->type == $club::TYPE_PUBLIC or $club->type == $club::TYPE_READONLY or $club->type == $club::TYPE_OPEN)
{
return 'ca';
}
@@ -1221,14 +1216,14 @@ class _Blog extends \IPS\Node\Model implements \IPS\Node\Ratings, \IPS\Content\E
{
$member = $member ?: \IPS\Member::loggedIn();
$where[] = array( 'blog_club_id IS NOT NULL' );
if ( $member->modPermission('can_access_all_clubs') )
{
return static::nodesWithPermission( NULL, $member, $where );
}
else
{
$where[] = array( 'blog_club_id IS NOT NULL' );
if ( $permissionCheck === 'add' )
{
$statuses = array( \IPS\Member\Club::STATUS_LEADER, \IPS\Member\Club::STATUS_MODERATOR );
@@ -1239,7 +1234,7 @@ class _Blog extends \IPS\Node\Model implements \IPS\Node\Ratings, \IPS\Content\E
}
$where[] = array( \IPS\Db::i()->in( 'status', $statuses ) );
return new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', 'blog_blogs', $where )->join( 'core_clubs_memberships', array( 'club_id=blog_club_id AND member_id=?', \IPS\Member::loggedIn()->member_id ) ), get_called_class() );
return new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', 'blog_blogs', $where )->join( 'core_clubs_memberships', array( 'club_id=blog_club_id AND member_id=?', $member->member_id ) ), get_called_class() );
}
}
}